Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

为什么会compile error啊?路过的大牛帮帮忙啊!!

Posted by TangMing at 2008-07-25 19:35:06 on Problem 2141
Main.c
Main.obj : error LNK2019: unresolved external symbol _strlwr referenced in function _main
Main.obj : error LNK2019: unresolved external symbol _strupr referenced in function _main
Main.exe : fatal error LNK1120: 2 unresolved externals

上面是什么回事啊,我的代码在一般的编译器上都没问题啊!!!

#include "stdio.h"
#include "string.h"
void main()
{ 
  int n,i;	
  char key[26],a[100],keyb[26];
  gets(key);
  gets(a);
  strcpy(keyb,strupr(key));
  strlwr(key);
  n=strlen(a);
  for(i=0;i<n;i++)
  {
     switch(a[i])
     {
        case 'a':a[i]=key[0];break;	
        case 'b':a[i]=key[1];break;
        case 'c':a[i]=key[2];break;
        case 'd':a[i]=key[3];break;
        case 'e':a[i]=key[4];break;
        case 'f':a[i]=key[5];break;
        case 'g':a[i]=key[6];break;
        case 'h':a[i]=key[7];break;
        case 'i':a[i]=key[8];break;
        case 'j':a[i]=key[9];break;
        case 'k':a[i]=key[10];break;
        case 'l':a[i]=key[11];break;
        case 'm':a[i]=key[12];break;
        case 'n':a[i]=key[13];break;
        case 'o':a[i]=key[14];break;
        case 'p':a[i]=key[15];break;
        case 'q':a[i]=key[16];break;
        case 'r':a[i]=key[17];break;
        case 's':a[i]=key[18];break;
        case 't':a[i]=key[19];break;
        case 'u':a[i]=key[20];break;
        case 'v':a[i]=key[21];break;
        case 'w':a[i]=key[22];break;
        case 'x':a[i]=key[23];break;
        case 'y':a[i]=key[24];break;
        case 'z':a[i]=key[25];break;
        case 'A':a[i]=keyb[0];break;
        case 'B':a[i]=keyb[1];break;
        case 'C':a[i]=keyb[2];break;
        case 'D':a[i]=keyb[3];break;
        case 'E':a[i]=keyb[4];break;
        case 'F':a[i]=keyb[5];break;
        case 'G':a[i]=keyb[6];break;
        case 'H':a[i]=keyb[7];break;
        case 'I':a[i]=keyb[8];break;
        case 'J':a[i]=keyb[9];break;
        case 'K':a[i]=keyb[10];break;
        case 'M':a[i]=keyb[11];break;
        case 'L':a[i]=keyb[12];break;
        case 'N':a[i]=keyb[13];break;
        case 'O':a[i]=keyb[14];break;
        case 'P':a[i]=keyb[15];break;
        case 'Q':a[i]=keyb[16];break;
        case 'R':a[i]=keyb[17];break;
        case 'S':a[i]=keyb[18];break;
        case 'T':a[i]=keyb[19];break;
        case 'U':a[i]=keyb[20];break;
        case 'V':a[i]=keyb[21];break;
        case 'W':a[i]=keyb[22];break;
        case 'X':a[i]=keyb[23];break;
        case 'Y':a[i]=keyb[24];break;
        case 'Z':a[i]=keyb[25];break;
        case ' ':a[i]=' ';break;
     }	
  }
  puts(a);
    
}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator