[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]


strerror

Translate an error number into an error message.

Compatibility:

This function is compatible with the following targets:

ANSI

BeOS

EMB/RTOS

Mac OS

Palm OS

Win32


Prototype:
#include <string.h>
char *strerror(int errnum);
Parameters:

Parameters for this facility are:

errnum  
int  
The error number to be translated.  

Remarks:

The strerror() function returns a pointer to a null terminated character array that contains an error message. The errnum argument is returned by strerror() in a string.

Return:

strerror() returns a pointer to a null terminated character array containing an error message that corresponds to errnum. Although normally the integer value in errnum will come from the global variable errno, strerror() will provide a message translation for any value of type int.

Example of strerror() usage.:
#include <string.h>
#include <stdio.h>

int main(void)
{
	puts(strerror(8));
	puts(strerror(ESIGPARM));

	return 0;
}

Output:
unknown error (8)
Signal Error


[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: August 16, 2000