Over Loaded Function Trouble

Intro(problem below):
First off hello everyone! I'm very new to programing and I am trying to get C++ down so I can start using SDL and such to make 2d games and hopefully upgrade to opengl.I seem to be having a lot of troubles with classes and such so I may be back, with some real brain busters and probably a few dumb questions. I know you all have lives and things to do so I can't express how much your help means!

Problem <Solved>:
I'm trying to learn Classes and such to get into SDL I've been having troubles learning. I don't know why but I'm learning very slowly. I keep getting an overloaded function error with this:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <iostream>
#include <cstdlib>
using namespace std;

class Menus{
    int x;
public:
    void begin (){
    cout<<"MAIN MENU...\n\n" << endl;
    cout << "1.New." << endl;
    cout << "2.Quit."<<endl;
    cin >> x;
    switch (x){
        case 1:
            system("exit");//Quits for testing purposes!
            break;
        case 2:
            system("exit");
            break;
        default:
            cout << "try again..."<<endl;
            break;
        }
    }
};

int main()
{
    Menus m1;
    m1.begin();\\Fixed Thanks to Bazzy

return 0;
}

Any help is appreciated.
Last edited on
You didn't put parentheses after m1.begin on line 24
Ah...well I feel dumb all part of learning I suppose Thank you very much sir.
Now you have backslashes instead of forward slashes ;^)
Topic archived. No new replies allowed.