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

BitLocker uses the __________to provide secure protection of encryption keys and checking of key components when Windows is booting

a. Trusted Platform Module b. USB port c. NTFS file system d. None of the above

Computer Science & Information Technology

To evaluate a formula, you select the cell and then click the _______ button from the Formula Auditing group on the Formulas tab.

A. Define Formula B. Select Formula C. Check Function D. Evaluate Formula

Computer Science & Information Technology

Which of the following can preven an unauthorized person from accessing the network by plugging into an open network jack?

A. 802.1x B. DHCP C. 802.q D. NIPS

Computer Science & Information Technology

Which statement is true about B-trees?

a) Traversals of a table can be done in sorted order more efficiently than a hash table. b) All nodes are children of the root. c) The root node contains either the largest or smallest key value. d) If there are n nodes in the B-tree, then the height of the tree is log2 n.

Computer Science & Information Technology