Hi i saw a post about this program already. im new to c++ and im lost... completely lost... im not even sure im posting this in the right place. anyways. the program i got is working correctly until i make it an OOP which is what my teacher wants us to do for every program we do. this is what i have so far.
// Menu Chooser.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <string>
#include<iostream>
using namespace std;
class MenuChooser
{
private:
public:
MenuChooser(){
int main()
{
cout << "Difficulty Levels\n\n";
cout << "1 - Easy\n";
cout << "2 - Normal\n";
cout << "3 - Hard\n\n";
enum level {easy = 1, normal = 2, hard = 3};
int choice;
cout << "Choice: ";
cin >> choice;
switch (choice)
{
case easy:
cout << "You choose Easy." << endl;
break;
case normal:
cout << "You choose Normal." << endl;
break;
case hard:
cout << "You choose Hard!!!" << endl;
break;
default:
cout << "You made an invalid choice!" << endl;
}
cout << "May the gods be with you!";
}
};
int _tmain(int argc, _TCHAR* argv[])
{
Menu Chooser;
return 0;
}
and i get this error.
1>c:\users\ceabear\desktop\c++\week 3 credit\menu chooser\menu chooser\menu chooser\menu chooser.cpp(64): fatal error C1075: end of file found before the left brace '{' at 'c:\users\ceabear\desktop\c++\week 3 credit\menu chooser\menu chooser\menu chooser\menu chooser.cpp(12)' was matched
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
i have no idea how to fix this. anyone?