0

hi,
kindly can u tell me how to disable all the window error massages include the run time error msg like
"system could not find the path of the file "
thank u..

3
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by Salem
0

Why would you want to do such a thing?

Better code is the answer, not sweeping the problem under the motherboard.

0

i have a project, during the running of my project there is an run time error occur that say can't run specific file but it run so i want to terminate this error "it is window error" i already don with the system properties but it is still there can any one help me out...

0

i have a project, during the running of my project there is an run time error occur that say can't run specific file but it run so i want to terminate this error "it is window error" i already don with the system properties but it is still there can any one help me out...

After decoding your message, I made out "My program runs fine, however an annoying error apears while it is running. How can I terminate this error?" Not sure what you mean by "system properties." That could mean anything.

Well... to get rid of an error message, you need to get rid of the error. Just like Salem said. I'd say the program you have is trying to access a file that dosent exist (Yes, I'm pointing out the obvious). That's about all I can do with the little vague information you gave us.

0

My way

FILE *fp = fopen( "missing_file.txt", "r" );
if ( fp != NULL ) {
  fgets( buff, sizeof buff, fp );
  fclose( fp );
} else {
  fprintf( stderr, "the file does not exist, continuing\n" );
}

Your way

FILE *fp = fopen( "missing_file.txt", "r" );
fgets( buff, sizeof buff, fp );
fclose( fp );

If you ignore important status results, then the OS will step in and kill your program. There is no alternative but to FIX YOUR CODE.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.