strerror

 

Description

Get a system error message.

Syntax

LPSTR strerror( int iErrNum )

Parameters

iErrNum
Error number whose error message is returned

Return

Returns a pointer to the first character of an error message associated with iErrNum.

Examples

EX1

void strerror_ex1()
{
    char * pErr;
    string strPrevious;
    int ii = 0;
    for(;1;)
    {
        strPrevious = pErr;
        pErr = strerror(ii++);
        if( strcmp(pErr,strPrevious)==0 )
            break;
        out_str(pErr);
    }
}

Remark

Get a system error message.

See Also

header to Include

origin.h

Reference