Apart from what "apatterno" has mentioned, I'd like to point out here that please take a look at the view class's definition. You'll notice that the constructor of a view class is "protected" and you can not create an object of that by using "new" operator. The view...
airswit:
The problem here is that you are not clearing the failed bit
after the first failure with 3 flags. This needs to be reset manually for the stream in concern. After you do that, an existing file can be opened with just in &/or out mode. So here is the corrected code...
Hi:
The solution to your problem is to change the line which reads
file_tm.tm_year += (file_tm.tm_year < 70 ) ? 2000 : 1900;
to the following:
file_tm.tm_year += (file_tm.tm_year < 70 ) ? 100 : 0;
Remember that time_t structure needs the year as: (current year minus 1900)
Hope this helps...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.