strcpy 与 strcat的用法
大家好,我在vc自带的帮助MSDN中找stract 与strcpy的用法,根据我的理解strcpy(a,b)就是把b的内容拷贝到a中,那么strcat()的用法呢??
------------------------------------------------------------------------
我在vc自带的帮助MSDN中找stract 与strcpy的用法,并且运行了MSDN自带的例子
#include <string.h>
#include <stdio.h>
void main( void )
{
char string[80];
strcpy( string, "Hello world from " );
strcat( string, "strcpy " );
strcat( string, "and " );
strcat( string, "strcat!" );
printf( "String = %s\n", string );
}
---------------------------------------------
运行时出错
D:\myproject\example\example.cpp(6) : error C2065: 'strcpy' : undeclared identifier
D:\myproject\example\example.cpp(7) : error C2065: 'strcat' : undeclared identifier
Error executing cl.exe.
example.obj - 2 error(s), 0 warning(s)
------------------------------------------------
我的问题是1.stract 与strcpy的用法(重点是strcat)
2.运行时出错信息说strcpy,strcat末定义,我应在哪定义呀??