Lecture 10 Flashcards
1
Q
What are the three main steps when a program is reading or writing to a file?
A
- Opening the file
- Reading from or writing to the file
- Closing the file
2
Q
What is the fstream library?
A
It allows you to stream to and from files and create fstream type objects.
3
Q
What is an object?
A
It is like a variable and can be declared and/or initialized. An object can hold more than one piece of information and can have functions that “belong” with it.
Vectors and strings are also objects
4
Q
What is the type of an fstream object?
A
Fstream