M
mark
this program compiles fine with g++ on linux. But on VC++ 6.0 I am
getting errors like below. I have tried including <cstring> as well
error C2065: string undeclared identifier
s1 undeclared identifier and similarly for s2 as well.
again the same code works just fine with g++ on linux.
#include <iostream>
#include <string>
int main()
{
string s1("hello");
string s2; cin>>s2;
cout<<s2;
cout<<s1<<endl;
return 0;
}
getting errors like below. I have tried including <cstring> as well
error C2065: string undeclared identifier
s1 undeclared identifier and similarly for s2 as well.
again the same code works just fine with g++ on linux.
#include <iostream>
#include <string>
int main()
{
string s1("hello");
string s2; cin>>s2;
cout<<s2;
cout<<s1<<endl;
return 0;
}