-
Registered User
Just need some sugjestions
i have got this menu program and i dont know wat to put in it i am no good at game programing any sugjestions.
-
Registered User
-
Registered User
he it is
#include <stdio.h>
#include <stdlib.h>
#include <iostream.h>
int main()
{
int sel;
while (sel>4 || sel<1)
{
cout<<"1. \n";
cout<<"2. \n";
cout<<"3. \n";
cout<<"4. Exit\n";
cout<<"Enter selection 1, 2, 3 or 4: ";
cin>>sel;
if (sel>4 || sel<1)
{
cout<<"Error! No such input.\n";
}
else
{
}
switch (sel)
{
case 1:
break;
case 2:
break;
case 3:
break;
case 4:
return 0;
}
}
}
-
Well, how about putting whatever you want your program to do upon each response in seperate functions, and then just call the functions in that switch statement?
-
Registered User
Hmmm
i dont have a program to put in. i am asking some one on what i sould put there
-
Pygmy Monkey
Aaah......if this is your program, shouldnt you be the one deciding the stuff in the menu???
I mean, we don't even know what this program's gonna be about.
-
Here are some suggestions...
----
case 1:
increase_ihsir_posts_by1000();
break;
case 2:
crack_univ_comp();
top__the_class();
break;
case 3:
get_me_some_money();
break;
---
just seeing your code, here are some tips-
use do-while, sel has not been initialized to be between 1-4
put return 0 before last } and not in case 4
-
Registered User
thanx but no thanx i think i got my own ideas now
-
Registered User
Original thinking? Who thunk it?!
Popular pages
Recent additions