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..

Why would you want to do such a thing?

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

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...

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.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.