c++ - String not working with cin! -


i'm having issue simple hello world code.

i'm not able cin name. says no defined operator ">>" can please. below code.

  #include <iostream>   using namespace std;     int main()    {        int x;        string name;        cout<< "enter name:";        cin>> name;        cout<< "hello "<< name <<endl;           system("pause");     } 

you have #include <string>.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -