_set_errno
Set the value of the errno
global variable.
Syntax
errno_t _set_errno( int error_value );
Parameters
error_value
The new value of errno
.
Return value
Returns zero if successful.
Remarks
Possible values are defined in Errno.h. Also, see errno
constants.
By default, this function's global state is scoped to the application. To change this behavior, see Global state in the CRT.
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.
See also
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για