|
perrorfunction
<cstdio> void perror ( const char * str ); Print error message Interprets the value of the global variable errno into a string and prints that string to stderr (standard error output stream, usually the screen), optionaly preceding it with the custom message specified in str.errno is an integral variable whose value describes the last error produced by a call to a library function. The error strings produced by perror depend on the developing platform and compiler. If the parameter str is not a null pointer, str is printed followed by a colon (:) and a space. Then, whether str was a null pointer or not, the generated error description is printed followed by a newline character ('\n'). perror should be called right after the error was produced, otherwise it can be overwritten in calls to other functions. Parameters.
Return ValuenoneExample
If the file unexist.ent does not exist, something similar to this Output is expected to be the program output: The following error occurred: No such file or directory See also
|