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...

A label control may be added to a form by double-clicking on the Label control icon in the __________ window.

a. Properties b. ToolBox c. Project d. Designer

Computer Science & Information Technology

Which default account is enabled when SQL Server authentication is enabled using mixed mode?

A. admin B. root C. sa D. superuser

Computer Science & Information Technology

When presenting a slide show, which key allows you to toggle between the slide and a black screen?

A) F1 B) Ctrl C) B D) Esc

Computer Science & Information Technology

In code examples […] stands for:

a. Go back to the beginning b. A link within the HTML c. The header d. Additional content within the divs

Computer Science & Information Technology