Hello friends,
When i try this simple program in Visual C++:
I get this error message:Code:#include<iostream> using namespace std; int main() { string s; cin>>s; cout<<s.c_str(); return 0; }
The error message comes because of this line:Code:error C2679: binary '>>' : no operator found which takes a right-hand operand of type 'std::string' (or there is no acceptable conversion)
I dont know how to solve this problem.Code:cin>>s;
Please help me.
Thank You,
Paramesh.




Reply With Quote