no match for operator

#include <iostream>
#include <string>
using namespace std;


int main()
{
int x;
cout<<"Please enter the value of x;
cin >> x;
cout<<"The value of x is "<<x;


return 0;

}


i was running this simple program but i got error like this

D:\helloworld\main.cpp|10|error: no match for 'operator>>' (operand types are 'std::basic_ostream<char>::__ostream_type {aka std::basic_ostream<char>}' and 'int')|
There is a missing terminating " character on the line before the cin. Just add this " before the ;
I have just added the missing " before the ;

The program works fine..
Topic archived. No new replies allowed.