10. If I have already written the #include header, I can overload operator<< for class A as follows: std::ost
Posted: Fri Apr 29, 2022 7:06 am
10. If I have already written the #include <iostream> header, I can overload operator<< for class A as follows: std::ostream& operator<< (std::ostream& out,const A& obj); 11. An input stream is a stream of data flowing from your program, either to a file, or to the keyboard. 12. cin is an output stream object of type ostream. 13. When a program sends data from itself to the outside, say to a file or the screen, we say it is writing the data on the file or to the screen. 14. Anistream object is already an ifstream object with some extra, added features. an open member function that ties the stream to a file, but the istream objects do not 15. When you write dfstream instream: instream.open("infile.dat"); the file infile.dat must be located in the directory where the program is being run. 1 16. A file is automatically closed when a program terminates, so there is never a need to close a file