errno.00 is:success errno.01 is:operation not permitted errno.02 is:no such file or directory errno.03 is:no such proc ESS errno.04 is:interrupted system call errno.05 is:input/output error errno.06 is:no such device or address errno.07 I
S:argument
Introduction:
Header file errno. h defines a Global Macro errno, Which is expanded into an int type "Left value", which means that the macro errno is not necessarily an object identifier, it can also be expanded into a "Left value" that can be
I. Origins of errnoIn C Programming, errno is an indispensable variable, especially in network programming. If you have never used errno, it only means that your program is not robust enough. Of course, if you are using getlasterror () on the Win32
There are three types of error reporting usages in the C language standard library.1, errnoerrno is defined in the header file as follows
#ifndef errno
extern int errno;
#endif
An external variable errno an implementation-defined
Errno (Error Report) usage in C language, errno Error Report
There are three forms of error reporting in the C language standard library.
1,Errno
Errno is defined in the header file, as follows:
#ifndef errnoextern int errno;#endif
The external
first, the origin of errnoIn C programming, errno is an indispensable variable, especially in network programming. If you have not used errno, it can only indicate that your program is not strong enough. Of course, if you are the GetLastError () of
When there is an exception to the C API function in Linux, generally will errno variable (need include errno.h) to assign an integer value, different values to represent different meanings, you can see the value of the reason for the error, in the
Lien000034August 24, 20141. errno variable
The file defines the symbol errno and various constants that can be assigned to it. These constants start with the character E. For example, if errno is equal to the constant eacces, a permission error
Ifndef _i386_errno_h#define _i386_errno_h#define EPERM 1/* Operation not permitted * *#define ENOENT 2/* No such file or directory */#define ESRCH 3/* No such process * *#define EINTR 4/* Interrupted system call * *#define EIO 5 */I/O error *
The C language provides a global variable errno for program execution. Errno is declared in errno. h.
The following example attempts to open a non-existing file and then outputs the errno value.
# Include
# Include
# Include
# Include
#
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.