Write a void function called copy_to_screen that copies the contents of a file to the screen. The argument of the function is an ifstream object. Preconditions and postconditions follow: Preconditions: The stream argument for the function has been connected to a file with a call to the member function open. Postcondition: The contents of the file connected to the ifstream argument have been copied to the screen so that the screen is the same as the contents of the file. This function does not close the file.
What will be an ideal response?
```
void copy_to_screen (ifstream& in)
{
char ch;
in.get(ch):
while( ! in.eof() )
{
cout << ch;
in.get(next);
}
}
```
Computer Science & Information Technology
You might also like to view...
Write a SELECT statement to determine how many students enrolled in February 2007 (157 rows).
What will be an ideal response?
Computer Science & Information Technology
What is spyware?
What will be an ideal response?
Computer Science & Information Technology
While not as detail-rich as vector images, bitmap graphic files are smaller and can be enlarged without losing image quality.?
Answer the following statement true (T) or false (F)
Computer Science & Information Technology
A blind copy notation appears on the original letter and on all copies of the letter.
Answer the following statement true (T) or false (F)
Computer Science & Information Technology