could someone give me an example of using one of the flags with file I/O for example. If your file is written return good() or something like that, I have the keywords, but I don't know the implementation. Thanks in advance.
could someone give me an example of using one of the flags with file I/O for example. If your file is written return good() or something like that, I have the keywords, but I don't know the implementation. Thanks in advance.
There are some real morons in this world please do not become one of them, do not become a victim of moronitis. PROGRAMMING IS THE FUTURE...THE FUTURE IS NOW!!!!!!!!!
"...The only real game I thank in the world is baseball..." --Babe Ruth
"Life is beautiful"-Don Corleone right before he died.
"The expert on anything was once a beginner" -Baseball poster I own.
Left cprog on 1-3-2005. Don't know when I am coming back. Thanks to those who helped me over the years.
fstream f1;
if(f1.good() && !f1.bad() && !f1.fail() )
cout<<"FILE IS OK";
else
cout<<"SOMETHING'S WRONG";
i guess that's the way to use it... (thats the way i use it)
you can also use just f1.good() or !f1.bad() or !f1.fail() in the is cndtn
-
Thanks I tried it and it worked.
There are some real morons in this world please do not become one of them, do not become a victim of moronitis. PROGRAMMING IS THE FUTURE...THE FUTURE IS NOW!!!!!!!!!
"...The only real game I thank in the world is baseball..." --Babe Ruth
"Life is beautiful"-Don Corleone right before he died.
"The expert on anything was once a beginner" -Baseball poster I own.
Left cprog on 1-3-2005. Don't know when I am coming back. Thanks to those who helped me over the years.