Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Set the value of the errno global variable.
errno_t _set_errno(
int value
);
Parameters
- [in] value
The new value of errno.
Return Value
Returns zero if successful.
Remarks
Possible values are defined in Errno.h. Also, see errno Constants.
Example
// crt_set_errno.c
#include <stdio.h>
#include <errno.h>
int main()
{
_set_errno( EILSEQ );
perror( "Oops" );
}
Oops: Illegal byte sequence
Requirements
Routine |
Required header |
Optional header |
---|---|---|
_set_errno |
<stdlib.h> |
<errno.h> |
For more compatibility information, see Compatibility in the Introduction.