May 18, 2014 at 3:19am UTC
Last edited on May 18, 2014 at 3:19am UTC
May 18, 2014 at 4:01am UTC
Hi,
Would you by any chance have google?
Or just search on this site, with the search button at the top of this page?
I am actually trying to be helpful, not sarcastic. :+D
May 18, 2014 at 4:16am UTC
hows this?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
#include <iostream>
using namespace std;
int main(int argc, const char * argv[])
{
bool quit = false ;
int option;
while (!quit) {
cout << "foo press 1" << endl;
cout << "foo press 2" << endl;
cout << "foo press 3" << endl;
cout << "foo press 4 to quit" << endl;
cin >> option;
switch (option) {
case 1:
cout << "you pressed 1" << endl;
break ;
case 2:
cout << "you pressed 2" << endl;
break ;
case 3:
cout << "you pressed 3" << endl;
break ;
case 4:
cout << "goodbye" << endl;
quit = true ;
break ;
default :
cout << "I dont understand, please try again" << endl;
break ;
}
}
return 0;
}
Last edited on May 18, 2014 at 4:17am UTC
May 18, 2014 at 4:56am UTC
@bdanielz thanks for the help!