Different Syntax

aanthonyz (3)
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;"?
dumb0t (21)
that is c++
cire (2347)
http://www.cplusplus.com/doc/tutorial/control/
aanthonyz (3)
They both are? Is there a simpler method of doing the mainmenu: and goto mainmenu;
aanthonyz (3)
Thank you for the link
Registered users can post here. Sign in or register to post.