1, some of the role of the header file:
: ANSI C. Provide assertion, assert (expression)
: GCC. Gtk,gnome's base library provides a number of useful functions, such as data structure manipulation functions. Use glib to include only
: GCC. Folder manipulation functions. struct Dirent,struct dir,opendir (), Closedir (), Readdir (), readdir64 (), etc.
: ANSI C. Character test function. IsDigit (), islower (), etc.
: ANSI C. Viewing error code errno is an important way to debug a program. When an exception occurs in the Linuc C API function, the errno variable (with the include errno.h) is typically assigned an integer value, and different values represent different meanings, which can be inferred by looking at the value. In the actual programming with this trick to solve a lot of the original seemingly inexplicable problems. The trouble is that each time to go to the Linux source code to find the meaning of the error code, now put it out, you need to check it later to see. /usr/include/asm/errno.h from the kernel code of the Linux 2.4.20-18
: Handles command-line arguments. Getopt ()
Linux Common header files are as follows:
POSIX standard-Defined header file
<dirent.h> Catalog Items
<fcntl.h> File Control
<fnmatch.h> file name Match type
<glob.h> path name pattern match type
<grp.h> Group files
<netdb.h> Network Database Operations
<pwd.h> Password file
<regex.h> Regular Expressions
<tar.h> Tar archive values
<termios.h> Terminal I/O
<unistd.h> Symbolic constants
<utime.h> file time
<wordexp.h> character Extension types
————————————————————————————————————————————————————————————————
<arpa/inet.h> Internet definition
<net/if.h> Socket Local Interface
<netinet/in.h> Internet Address Family
<netinet/tcp.h> Transmission Control Protocol Definition
————————————————————————————————————————————————————————————————
<sys/mman.h> Memory Management Statement
<sys/select.h> Select function
<sys/socket.h> Socket Excuses
<sys/stat.h> file Status
<sys/times.h> Process Time
<sys/types.h> Basic System data types
<sys/un.h> UNIX domain sockets definition
<sys/utsname.h> system Name
<sys/wait.h> Process Control
————————————————————————————————————————————————————————————————
POSIX-defined xsi extension header file
<cpio.h> Cpio Archive values
<dlfcn.h> Dynamic Links
<fmtmsg.h> Message Display structure
<ftw.h> File Tree Roaming
<iconv.h> code set conversion using programs
<langinfo.h> Language Information Constants
<libgen.h> Pattern matching function definition
<monetary.h> Currency Types
<ndbm.h> Database Operations
<nl_types.h> Message Categories
<poll.h> Polling functions
<search.h> search Form
<strings.h> string manipulation
<syslog.h> System error log records
<ucontext.h> User Context
<ulimit.h> User Restrictions
<utmpx.h> User Account Database
————————————————————————————————————————————————————————————————
<sys/ipc.h> IPC (Named pipes)
<sys/msg.h> Message Queuing
<sys/resource.h> Resource Operations
<sys/sem.h> Signal Volume
<sys/shm.h> shared storage
<sys/statvfs.h> File System Information
<sys/time.h> Time Type
<sys/timeb.h> additional date and time definitions
<sys/uio.h> vector I/O operations
————————————————————————————————————————————————————————————————
POSIX-defined optional header file
<aio.h> Asynchronous I/O
<mqueue.h> Message Queuing
<pthread.h> Threads
<sched.h> Execution Scheduling
<semaphore.h> Signal Volume
<spawn.h> real-time Spawn interface
<stropts.h> XSI Streams interface
<trace.h> Event Tracking
3 C/C + + header file List
C.
#include <assert.h>/Set insertion point
#include <ctype.h>//character processing
#include <e rrno.h>//Definition error code
#include <float.h>//floating-point processing
#include <iso646.h>//macros for various operators
#include <li Mits.h>//Define constants for the most values of various data types
#include <locale.h>//define localized C functions
#include <math.h>//define mathematical functions
#inclu De <setjmp.h>//exception handling support
#include <signal.h>//signaling mechanism support
#include <stdarg.h>//indefinite parameter list support
# Include <stddef.h>//Common constants
#include <stdio.h>//define input/output functions
#include <stdlib.h>//define miscellaneous functions and memory allocation letters Number
#include <string.h>//String processing
#include <time.h>//define functions for TIME
#include <wchar.h>//wide characters Processing and input/output
#include <wctype.h>//wide character classification
Traditional C + +
#include <fstream.h>//switch to <fstream>
#include <iomanip.h>//switch to <iomainip>
#include <iostream.h>//switch to <iostream>
#include <strstrea.h>//This class is no longer supported, instead use the StringStream in <sstream>
————————————————————————————————————————————————————————————————
Standard C + +
#include <algorithm>//stl General algorithm
#include <bitset>//stl bit set container
#include <cctype>//character processing
#include <cerrno>//define error codes
#include <cfloat>//floating-point processing
#include <ciso646>//macros corresponding to various operators
#include <climits>//define constants for the most values of various data types
#include <clocale>//define localization functions
#include <cmath>//defining mathematical functions
#include <complex>//plural class
#include <csignal>//signaling mechanism support
#include <csetjmp>//exception handling support
#include <cstdarg>//indefinite parameter list support
#include <cstddef>//Common constants
#include <cstdio>//define input/output functions
#include <cstdlib>//define miscellaneous functions and memory allocation functions
#include <cstring>//String processing
#include <ctime>//define functions for TIME
#include <cwchar>//wide character processing and input/output
#include <cwctype>//Wide character categories
#include <deque>//stl Dual-ended queue container
#include <exception>//exception handling classes
#include <fstream>//File input/output
#include <functional>//stl Defining an operation function (instead of an operator)
#include <limits>//define a variety of data type MAX-values constants
#include <list>//stl Linear list container
#include <locale>//localization of specific information
#include <map>//stl mapping container
#include <memory>//stl memory allocations through the allocator
#include <new>//Dynamic memory allocation
#include <numeric>//stl Common digital operations
#include <iomanip>/Parametric input/output
#include <ios>//Basic input/output support
#include <iosfwd>//input/output system use of the predecessor declaration
#include <iostream>//data stream input/output
#include <istream>//Basic input stream
#include <iterator>//stl iterators
#include <ostream>//Basic output stream
#include <queue>//stl Queue container
#include <set>//stl Collection container
#include <sstream>//string-based streaming
#include <stack>//stl Stack container
#include <stdexcept>//Standard Exception class
#include <streambuf>//Bottom input/output support
#include <string>//String class
#include <typeinfo>//run-time type information
#include <utility>//stl Generic template class
#include <valarray>//operations on arrays that contain values
#include <vector>//stl dynamic array container
————————————————————————————————————————————————————————————————
C99 Added Parts
#include <complex.h>//complex processing
#include <fenv.h>//floating-point environment
#include <inttypes.h>//integer format conversion
#include <stdbool.h>//Boolean environment
#include <stdint.h>//Integral environment
#include <tgmath.h>//general type Math macro
If you want to see stdio.h, you can use man stdio.h
c&c++--Library header file and its role