Specification: Display a menu
Find Errors in this program
#include "stdafx.h"
#include <iostream> //change io to iostream
#include <string>
using namespace std; // added
I get the Error 1 error C2065: 'choice' : undeclared identifier line 17 which is 'choice'
What am i missing?
int main ()// added int
{ //reversed this symbol
cout << "Choose From Martha's Menu:\n"; //reversed <<
cout << "1 - Dinner"; // added ;
cout << endl << " 2 - Lunch"; //correct endl and added ;
cout << endl << "3 - Breakfast"; //corrected endl and added ;
cout << "Enter a number:";
std::cin >> choice;
int choice = 0;
cout << "You Choose " << choice;
;return 0;
}