Undeclared Identifier

I have a code which we are supposed to find the problems. I have found most of the problems in the code but microsoft Visual keeps telling me 'cin' undeclared variable. I do not know how to fix this code can anyone recommed a fix. Here is the code;

//Specification: Display a menu
//Find Errors in this program

#include "stdafx.h" // #include "stdafx.h" was added
#include <iostream> //io was changed to iostream

int main()//int was missing

{

std::cout<<"Choose From Martha's Menu:/n"<<std::endl;

std::cout<<"1 - Dinner"<<std::endl;

std::cout<<"2 - Lunch"<<std::endl;

std::cout<<"3 - Breakfeast"<<std::endl;

std::cout<<"Enter a number:"<<std::endl;

int choice = 0;
cin<< choice;
std::cout<<"\n You Choose "<<choice<<std::endl;
return 0;
}
Should be:

std::cin >> choice;


Thank you so much. This is my first C++ class and I was having a tough time trying to figure out what to do with this code. The addition of std::cin>> choice; worked and now the code is right.
I also found that I could have used
using std::cout;
using std::cin;
using std::endl;

in the header to eliminate all of the std:: in the code and made it work just the same. But thank you for your help it moved me in the right direction.
You could have also used:
using namespace std;

To use all members from the std namespace.
Topic archived. No new replies allowed.