0
How to create main menu in c++ that takes the value and performs the operation according to that value...
It takes first value and perform the operation according to that value and after performing it asks again that now what to do exit or else...??? (PLEASE HELP)
2 ответов
+ 2
ValueType value = getInput();
while(value != actionExit) {
switch (value) {
case actionOne:
performActionOne();
break;
// and so on ...
};
value = getInput();
}
+ 2
do it with if else,
example:
int action = 0;
cin>> action;
if (action == 1)
//do something
else if(action == 2)
//do something
else
//do something
.
.
.