Linux header file

Source: Internet
Author: User
Tags bit set mathematical functions unix domain socket

 

1. Functions of some header files:
<Assert. h>: ansi c. Assert (expression)

<Glib. h>: GCC. GTK, the basic library of gnome, provides many useful functions, such as data structure operation functions. To use glib, you only need to include <glib. h>

<Dirent. h>: GCC. Folder operation function. Struct dirent, struct Dir, opendir (), closedir (), readdir (), readdir64 (), etc.

<Ctype. h>: ansi c. Character Test function. Isdigit (), islower (), etc.

<Errno. h>: ansi c. Checking the error code errno is an important way to debug the program. When the linuc c api function encounters an exception, the errno variable (which must include errno. h) assign an integer. Different values indicate different meanings. You can view the cause of the error by checking the value. In actual programming, this solution solves many seemingly inexplicable problems. It is troublesome to go To the Linux source code every time to find the meaning of the error code. Now I will post it and check it later. From Linux
/Usr/include/ASM/errno. h in kernel code 2.4.20-18

<Getopt. h>: process command line parameters. Getopt ()

2,
-------------------------
Common Linux header files are as follows:
POSIX standard-defined header files
<Dirent. h> directory item
<Fcntl. h> file control
<Fnmatch. h> file name matching type
<Glob. h> path name pattern matching type
<GRP. h> group file
<Netdb. h> Network Database Operations
<PWD. h> Password File
<RegEx. h> Regular Expression
<Tar. h> tar archive Value
<Termios. h> terminal I/O
<Unistd. h> symbolic constant
<Utime. h> file time
<Wordexp. h> character extension type
-------------------------
<ARPA/inet. h> Internet Definition
<Net/If. h> Local socket 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 excuse
<Sys/STAT. h> File status
<Sys/times. h> process time
<Sys/types. h> Basic System Data Type
<Sys/UN. h> Unix domain socket Definition
<Sys/utsname. h> system name
<Sys/Wait. H> Process Control
------------------------------
POSIX-defined xsi extension header file
<Cpio. h> cpio archive Value
<Dlfcn. h> Dynamic Link
<Fmtmsg. h> Message Display Structure
<FTW. h> file tree roaming
<Iconv. h> code set conversion application
<Langinfo. h> constant of Language Information
<Libgen. h> pattern matching Function Definition
<Monetary. h> currency type
<Ndbm. h> database operations
<Nl_types.h> message category
<Poll. h> round robin Function
<Search. h> Search tables
<Strings. h> string operation
<Syslog. h> system error logging
<Ucontext. h> User Context
<Ulimit. h> User restrictions
<Utmpx. h> User Account Database
-----------------------------
<Sys/IPC. h> IPC (Named Pipe)
<Sys/msg. h> Message Queue
<Sys/resource. h> Resource Operations
<Sys/SEM. h> semaphores
<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 files
<AIO. h> asynchronous I/O
<Mqueue. h> Message Queue
<Pthread. h> thread
<Sched. h> execute Scheduling
<Semaphore. h> semaphores
<Spawn. h> real-time spawn Interface
<Stropts. h> xsi streams Interface
<Trace. h> event tracking

3. Overview of C/C ++ header files
C
# Include <assert. h> // set the insertion point
# Include <ctype. h> // Character Processing
# Include <errno. h> // defines error codes.
# Include <float. h> // floating point number processing
# Include <iso646.h> // macros corresponding to various operators
# Include <limits. h> // defines the constants with the highest values of various data types.
# Include <locale. h> // defines the localization c Function
# Include <math. h> // defines mathematical functions.
# Include <setjmp. h> // Exception Handling Support
# Include <signal. h> // signal Mechanism support
# Include <stdarg. h> // optional parameter list
# Include <stddef. h> // common Constants
# Include <stdio. h> // define Input/Output Functions
# Include <stdlib. h> // defines miscellaneous functions and memory allocation functions.
# Include <string. h> // string processing
# Include <time. h> // defines the time function.
# Include <wchar. h> // wide character processing and input/output
# Include <wctype. h> // wide character Classification

Traditional C ++
# Include <fstream. h> // use <fstream>
# Include <iomanip. h> // use <iomainip>
# Include <iostream. h> // use <iostream>
# Include <strstrea. h> // This class is no longer supported. Instead, use stringstream in <sstream>.
--------------------------------

Standard C ++
# Include <algorithm> // General STL Algorithm
# Include <bitset> // STL bit set container
# Include <cctype> // Character Processing
# Include <cerrno> // defines error codes
# Include <cfloat> // floating point number processing
# Include <ciso646> // macro corresponding to various operators
# Include <climits> // defines constants with the highest values of various data types.
# Include <clocale> // defines localization Functions
# Include <cmath> // define mathematical functions
# Include <complex> // plural class
# Include <csignal> // signal Mechanism support
# Include <csetjmp> // Exception Handling Support
# Include <cstdarg> // optional parameter list
# Include <cstddef> // common Constants
# Include <cstdio> // define Input/Output Functions
# Include <cstdlib> // defines miscellaneous functions and memory allocation functions.
# Include <cstring> // string processing
# Include <ctime> // defines the time function.
# Include <cwchar> // wide character processing and input/output
# Include <cwctype> // wide character Classification
# Include <deque> // STL double-end queue container
# Include <exception> // exception handling class
# Include <fstream> // file input/output
# Include <functional> // STL defines operation functions (instead of operators)
# Include <limits> // defines the maximum constants of various data types.
# Include <list> // STL linear list container
# Include <locale> // localized specific information
# Include <map> // STL ing container
# Include <memory> // memory allocation by STL through the distributor
# Include <New> // dynamic memory allocation
# Include <numeric> // common STL numeric operations
# Include <iomanip> // parameterized input/output
# Include <IOS> // Basic Input/Output support
# Include <iosfwd> // pre-declaration used by the input/output system
# Include <iostream> // Data Stream Input/Output
# Include <istream> // basic input stream
# Include <iterator> // STL iterator
# Include <ostream> // Basic output stream
# Include <queue> // STL queue container
# Include <set> // STL collection container
# Include <sstream> // string-based stream
# Include <stack> // STL stack container
# Include <stdexcept> // standard exception class
# Include <streambuf> // underlying input/output support
# Include <string> // string class
# Include <typeinfo> // type information during running
# Include <utility> // STL common template class
# Include <valarray> // operations on arrays containing values
# Include <vector> // STL dynamic array container
--------------------------------

C99 added
# Include <complex. h> // plural Processing
# Include <fenv. h> // floating point Environment
# Include <inttypes. h> // integer format conversion
# Include <stdbool. h> // Boolean Environment
# Include <stdint. h> // integer environment
# Include <tgmath. h> // general mathematical macros

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.