Monday, March 31, 2014

Class of March 31, 2014

     Common reasons for open to fail include: that the file might not exist or that the name that was typed is written incorrectly. To catch errors we use member function fail. Fail will return a bool value and if this value is true, the stream operation failed. The function exit, halts a program which is what is best to do when a stream open function fails.

No comments:

Post a Comment