how would you go by creating this

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.
A good doc on switch cases: http://cplusplus.com/doc/tutorial/control/

Thanks,
Aceix.
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).
can you write it out for me
Why don't you start?

Aceix.
Topic archived. No new replies allowed.