Chapter 12: Problem 3
Assume that the file data.txt already exists, and the following statement executes. What happens to the file? fstream file("data.txt", ios::out);
Chapter 12: Problem 3
Assume that the file data.txt already exists, and the following statement executes. What happens to the file? fstream file("data.txt", ios::out);
All the tools & learning materials you need for study success - in one app.
Get started for freeIf a program has read to the end of a file, what must you do before using either the seekg or seekp member functions?
T F The getline member function can be used to read text that contains whitespaces.
In C++, __________ provide a convenient way to organize data into fields and records.
T F A file may be opened in the definition of the file stream object.
Write two statements that use a file stream object named places to open a file named places.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 both input and output.
What do you think about this solution?
We value your feedback to improve our textbook solutions.