Chapter 12: Problem 56
True or False A file stream object's fail member function may be used to determine if the file was successfully opened.
Chapter 12: Problem 56
True or False A file stream object's fail member function may be used to determine if the file was successfully opened.
All the tools & learning materials you need for study success - in one app.
Get started for freeEach of the following programs or program segments has errors. Find as many as you can. fstream file(ios:: in | ios: :out) ; file.open ("info.dat") ; if ( ! file) cout \(<<\) "Could not open file. \(\backslash n^{\prime \prime}\)
True or False The same output formatting techniques used with cout may also be used with file stream objects.
The ___ member function returns a file's current write position.
Write two statements that use a file stream object named people to open a file named people. dat. (Show how to open the file with a member function and at the definition of the file stream object.) The file should be opened for output.
How do you combine multiple file access flags when opening a file?
What do you think about this solution?
We value your feedback to improve our textbook solutions.