读书人

C/C++ 关于strupr()函数报错和#incl

发布时间: 2012-04-19 14:36:43 作者: rapoo

C/C++ 关于strupr()函数报错和#include <syslib.h>
#include <syslib.h>
#include <string.h>
#include <stdio.h>

main()
{
char *s="Copywrite 1999-2000 GGV Technologies";

clrscr();

printf("%s",strupr(s));
getchar();
return 0;
}

编译时报错 fatal error C1083: Cannot open include file: 'syslib.h': No such file or directory Error executing cl.exe.

[解决办法]
#include <syslib.h> 该为<conio.h>看看?
[解决办法]
噢!还有一个strupr()包含在string.h中。
[解决办法]
如果是用的vc,建议lz将clrscr()改为system("cls");此函数在process.h和windows.h中二者任包含一个均可
[解决办法]

C/C++ code
#include  <process.h>#include  <string.h>#include  <stdio.h>main(){   //char *s="Copywrite 1999-2000 GGV Technologies"; //这里的字符串是在静态数据区,不能修改的!   char s[]="Copywrite 1999-2000 GGV Technologies"; //改成这样在试试看!   system("cls");   printf("%s",strupr(s));   getchar();   return 0;} 

读书人网 >C语言

热点推荐