I'm stuck with goto. I need to stop cause sometimes, it screws up my code. I used to do something like this.
int command;
start:
command = NULL; // this was a random guess to see if it would work
cin >> command;
if(command == 1){
cout << "Your chose 1" << endl;
pause; //I defined this
goto start;
}
And so after some heated debates over goto, I decided to try out the while. So now my code looks like this.
int command;
cin >> command;
while(command == 1)
{
reset; //resets command to null (this is defined)
cout << "You chose 1" << endl;
pause; //defined
}
But when I run that, the code works other than the fact that it exits out after pause. How do I have it go back to the main "cin"?