Write the definition for a void function called textToScreen that has one formal parameter called fileStream that is of type ifstream. The precondition and postcondition for the function are as follows:
//Precondition: The stream fileStream has been connected //to a file with a call to the member function open. //Postcondition: The contents of the file connected to //fileStream have been copied to the screen character by //character, so that the screen output is the same as the //contents of the text in the file. //(This function does not close the file.) |
Want to see the full answer?
Check out a sample textbook solutionChapter 6 Solutions
Problem Solving with C++ (10th Edition)
Additional Engineering Textbook Solutions
Absolute Java (6th Edition)
Starting Out with Java: From Control Structures through Objects (6th Edition)
Java: An Introduction to Problem Solving and Programming (7th Edition)
Starting Out with Python (4th Edition)
Starting Out with Java: Early Objects (6th Edition)