How to read data from a disk file? process end of file and process error conditions?
How do you compare bag and set? (I know set cannot have duplicates any other points?)
Printable View
How to read data from a disk file? process end of file and process error conditions?
How do you compare bag and set? (I know set cannot have duplicates any other points?)
Very broad questions.
Reading data from a file in C++ is done through the ifstream class. EOF and any errors can be detected by various member functions of the stream object, such as good(), bad(), and eof(). If a read operation fails, you can use one a number of such functions to figure out what happened.
No idea what your second paragraph refers to.