Different Syntax

Jan 2, 2013 at 12:02am
I am wondering if these codes are for C++ or C and if there is a simpler method to produce the same results.

getch();
Would the equivalent be cin.get(); ?

Im trying to structure everything in a neat manner, someone gave me an example like this:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//Main Menu
mainmenu:
system("CLS");
cout << "asdfsdf";
cin >> input;
switch(input)
{
case 1:
goto character;
case 2:
goto exit;
default:
goto mainmenu;
}
 


Is there an alternative to "mainmenu:" and "goto mainmenu;"?
Jan 2, 2013 at 12:18am
that is c++
Jan 2, 2013 at 12:26am
Jan 2, 2013 at 12:26am
They both are? Is there a simpler method of doing the mainmenu: and goto mainmenu;
Jan 2, 2013 at 12:38am
Thank you for the link
Topic archived. No new replies allowed.