So here I am, trying to do this myself, with no teacher and I've reached a bit of an impass. I still on the basic tutorial, (Huge N00b here!) and on the switch case scenario. I apologize in advance is this elicits sighs of exhasperation. Here goes....
I can't get the darn thing to work correctly! I open the file itself and I enter a value, but the program simply closes! I can't think of what to do. Any help for a desperate would be programmer?Code:#include <iostream>
using namespace std;
int a();
int b();
int c();
int main()
{
int input;
cout<<"1. Play game\n";
cout<<"2. Load game\n";
cout<<"3. Play multiplayer\n";
cout<<"4. Exit\n";
cout<<"Selection: ";
cin>> input;
switch ( input ) {
case 1:
cout<<"Whoops! Broken disk...\n"; if ( a = 1 );
break;
case 2: /
cout<<"Waiting for image...\n"; if ( b == 2 );
break;
case 3:
cout<<"n00b!\n"; if ( c = 3 );
break;
case 4:
cout<<"Thank you for playing!\n";
break;
default:
cout<<"Error, bad input, quitting\n";
break;
}
cin.get();
}