#include<string.h>
#include<iostream.h>
void main()
{
string s("try a string test");
cout<<s<<endl;
}
编译错误error C2065: 'string' : undeclared identifier
把下列头文件都加上,就好了
#include <sstream>
用标准的写法即可.不过建议用新点的vc.如2005及以上的.或直接用gcc,对标准的支持会好些.
#include<string>