[求助]C++问题请教?
这是C++ Primer Plus 第五版第四章的习题:#include <iostream>
//#include <cstring>
int main()
{
using namespace std;
char name[20];
char des[20];
char full[21];
cout<<"Enter your firat name:";
cin.getline(name,20);
cout<<"Enter your last name:";
cin.getline(des,20);
strncpy(full,des,20);
strcat(full,", ");
strncat(full,name,20);
cout<<"Here's the information in asingle string:"<<full<<" "<<endl;
}
请教:为什么我不使用#include <cstring>照样能正常编译,有了<iostream>还有必要加<cstring>吗?在线求解!!!谢谢!!!
编译环境:VC2005 VC2003都通过了!