Hi. I want to know how to disable error checking. In pascal it's {$I-}. How it looks in c++?
5 replies to this topic
#1
Posted 06 November 2010 - 05:10 AM
|
|
|
#2
Posted 06 November 2010 - 06:29 AM
Why would you wanna do that?
A conclusion is where you got tired of thinking.
#define class struct // All is public.
#3
Posted 06 November 2010 - 06:56 AM
I have to write program that edit text files. And if program can't open text files it should give error message: 'Can't open text file'.
#4
Posted 06 November 2010 - 08:53 AM
if you want to print an error in case a file wasn't open successfully you can use is_open() function as follow
I hope this helps!
Munir
ifstream file("test.txt")
if (!file.is_open())
{
cout<<"I cannot open the file"<<endl;
return 0;
}
I hope this helps!
Munir
#5
Posted 06 November 2010 - 09:24 AM
Thanks :)
#6
Posted 06 November 2010 - 11:04 AM
Oh, did you mean how to check for errors? Because you wrote how to disable error checking.
A conclusion is where you got tired of thinking.
#define class struct // All is public.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









