Ok im a noob to C++ programming and this is my first post here. So dont flame me too bad if this seems like a dumb question.
Just to tell you how big a noob I am, I just got out of the hello world phase a little while ago.
Anyway heres my question.
I am trying to make some kind of very simple command prompt thingy. Heres some code:
{
char name[25];
cout<<"Welcome\n";
cout<<"\n->";
cin.getline ( name, 25 );
if ( strcmp ( name, "test" ) == 0 )
{
cout<<"Test completed. System working normally.\n";
}
if ( strcmp ( name, "help" ) == 0 )
{
cout<<"List of commands:\n";
cout<<"test,help";
}
}
how would I make the program jump back to the starting point after the end of every if statement instead of returning 0 and ending?