Different Syntax

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;"?
that is c++
They both are? Is there a simpler method of doing the mainmenu: and goto mainmenu;
Thank you for the link
Topic archived. No new replies allowed.