Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
div
eof
Expand Minimize

_set_errno

Set the value of the errno global variable.

errno_t _set_errno( 
   int value 
);

[in] value

The new value of errno.

Returns zero if successful.

Possible values are defined in Errno.h. Also, see errno Constants.

// crt_set_errno.c
#include <stdio.h>
#include <errno.h>

int main()
{
   _set_errno( EILSEQ );
   perror( "Oops" );
}
Oops: Illegal byte sequence

Routine

Required header

Optional header

_set_errno

<stdlib.h>

<errno.h>

For more compatibility information, see Compatibility in the Introduction.

Show:
© 2015 Microsoft