Thread: Printing
View Single Post
Old 08-27-2005, 11:58 AM   #7 (permalink)
Salchester
Salchester
 
Salchester's Avatar
 
Join Date: Jul 2005
Location: In a house
Posts: 230
Salchester is an unknown quantity at this point
Printing

How do i print a file when i press 'P' within the menu?
What coding do i need to put in the switch statment, under case 'P'?

Many Thanks

Code:
#include <iostream.h>
#include <iomanip.h>
#include <conio.h>
#include <ctype.h>
#include <dos.h>

int main (void)
{
  char choice;
  do
  {
    cout << "P = Print File";
    cout << "Q = Quit";
    cout << "Choice: ";
    cin >> choice;
    choice = toupper (choice);
    switch (choice)
    {
      case 'P':
               break;
      case 'Q':
               break;
      default: gotoxy(46,17);
               cout << "INCORRECT";
               delay(2000);
    }
  } while (choice != 'Q');
}
__________________
Many Thanks, in advance!

Salchester.
The Future Is Here - Are You Ready?
Salchester is offline   Reply With Quote