how would you go by creating this

Apr 30, 2013 at 6:25am
write a program that uses a switch statement to create a menu for entering and reading data from a text file. the menue should contain 'A' to add a record, 'D' to display the data in the file ,and 'Q' to quite. The data should be two integers names value1 and value2. make certain that the program can be rerun without losing the data already in the file.
Apr 30, 2013 at 9:36am
A good doc on switch cases: http://cplusplus.com/doc/tutorial/control/

Thanks,
Aceix.
Apr 30, 2013 at 10:25am
A switch statement looks something like this:

switch(condition expression)
{
case(constant1)
{
statement
break;
}
case(constant2)
{
statement
break;
}
default: statement
}

-where you can have as many cases as you want, as long as the constants that they're checking for are different (in your case checking the input).
Apr 30, 2013 at 7:54pm
can you write it out for me
Apr 30, 2013 at 8:10pm
Why don't you start?

Aceix.
Topic archived. No new replies allowed.