Command Prompt for Windows




perror, _wperror, _tperror

void perror(char *msg);
void _wperror(wchar_t *msg);
void _tperror(TCHAR *msg);

Display an error message msg.

Parameter Description
msg Address of a NULL terminated character string that contains the

message to display.


Returns

There is no return value.

Comments

The message along with two CR-LF character combinations is written to stderr. Stderr is not streamable, that is, when stdout is redirected on the command line to a file, stderr will still write to the screen.

RED is used for the foreground colour.

See Also

errcnt, printf, putx, puts, putchar