Assume that your program opens a file stream, has a file connected, and writes to the file. What changes need to be made to make your program write to the screen? (There will be stuff you need to delete and stuff that you need to change.)
What will be an ideal response?
To make a program that writes to a file write to the screen, replace ifstream and ofstream with istream and ostream respectively. Then remove calls to open and close fstream members (because they are not iostream members).
Computer Science & Information Technology
You might also like to view...
Which of the following contains information about a single entity in the database?
A. a form B. a field C. a query D. a record
Computer Science & Information Technology
Calculate the probability of drawing a ace from the deck followed by another ace, if the first card is replaced after it is drawn.
A.
B.
C.
D.
E.
Computer Science & Information Technology