In C language series programs, header files are widely used. Generally speaking, each C++/C program usually consists of a header file and a definition file. As a carrier file containing functional functions and data interface declarations, header files are mainly used to save the declarations of programs, while definition files are used to save the implementation of programs. C is the program file you wrote.
List of C/C++ header files
C
# include & ltassert.h & gt// Set the insertion point.
# include & ltctype.h & gt// character processing
# include & lt error number & gt// Define the error code.
# include & ltfloat.h & gt// floating point number processing
# include < iso 646.h >//Macros corresponding to various operators
# include & lt restriction. & gt// Constant that defines the maximum value of various data types.
# include & ltlocale.h & gt// Define localized C functions.
# include & ltmath.h & gt// Define a mathematical function.
# include < setjmp.h >//exception handling support
# include < signal.h >//signal mechanism support
# include & ltstdarg.h & gt// Uncertain parameter list support
# include & ltstddef.h & gt// Universal constant
# include & ltstdio.h & gt// Define input/output functions.
# include & ltstdlib.h & gt// Define miscellaneous functions and memory allocation functions.
# include & ltstring.h & gt// string processing
# include & lttime.h & gt// Define a function about time.
# include & ltwchar.h & gt// Wide character processing and input/output
# include & ltwctype.h & gt// wide character classification
Traditional C++
# include & ltfstream.h & gt// Use
# include & ltiomanip.h & gt// Use
# include & ltiostream.h & gt// Use
# include & ltstrstrea.h & gt///This class is no longer supported, and
————————————————————————————————
Standard C++
# include & lt algorithm & gt//STL general algorithm
# include & ltbitset & gt//STL bit set container
# include & ltcctype & gt// character processing
# include & ltcerrno & gt// Define the error code
# include & ltcfloat & gt// floating point number processing
# include & ltciso646 >// Macros corresponding to various operators
# include & ltclimits & gt// Constant that defines the maximum value of various data types.
# include & ltclocale & gt// Define localization function.
# include & ltcmath & gt// Define a mathematical function.
# include & lt Complex & gt// Complex class
# include & ltcsignal & gt// signal mechanism support
# include & ltcsetjmp & gt// exception handling support
# include & ltcstdarg & gt// Uncertain parameter list support
# include & ltcstddef & gt// Universal constant
# include & ltcstdio & gt// define input/output functions.
# include & ltcstdlib & gt// Define miscellaneous functions and memory allocation functions.
# include & ltcstring & gt// string processing
# include & ltctime & gt// Define a function about time.
# include & ltcwchar & gt///wide character processing and input/output
# include & ltcwctype & gt// wide character classification
# include & lt dirk & gt//STL queue container
# include & lt exception & gt// exception handling class
# include & ltfstream & gt// file input/output
# include & lt Functionality & gt//STL defines an operation function (not an operator).
# include & lt limit & gt// Defines the maximum constants of various data types.
# include & lt list & gt//STL linear list container
# include & lt Locale & gt// Localize specific information
# include & lt map & gt//STL mapping container
# include & lt memory & gt// allocate STL memory through allocator.
# include & lt New & gt// Dynamic memory allocation
# include & lt numerical & gt//STL general digital operation
# include & ltiomanip & gt// parameter input/output
# include & ltios & gt// Basic input/output support
# include & ltiosfwd & gt// Pre-declaration used by input/output system
# include & ltiostream & gt// data stream input/output
# include & ltistream & gt///basic input stream
# include & lt iterator & gt//STL iterator
# include & ltostream & gt///basic output stream
# include & lt queue & gt//STL queue container
# include & ltset & gt//STL collection container
# include & ltsstream & gt// String-based stream
# include & lt stack & gt//STL stack container
# include & ltstdexcept & gt///standard exception class
# include & ltstreambuf & gt///underlying input/output support
# include & lt string & gt// string class
# include & lttypeinfo & gt// Type information during the operation.
# include & lt utility & gt//STL generic template class
# include & ltvalarray & gt// Operate on an array containing values.
# include & ltvector & gt//STL dynamic array container
————————————————————————————————
C99 addition
# include & ltcomplex.h & gt// Complex processing
# include & ltfenv.h & gt///floating-point environment
# include & ltinttypes.h & gt// integer format conversion
# include & ltstdbool.h & gt///Boolean environment
# include & ltstdint.h & gt// integer environment
# include & lttgmath.h & gt// General type math macro
Header file ctype.h
Character processing function: this category function is used to process a single character, including the category test of the character and the case conversion of the character.
-
Is the character test alphanumeric?
Is that the letter isalpha?
Whether to control the character iscntrl.
Is it digital?
Can I display characters (except spaces)?
Can I display characters (including spaces)?
Is it a displayable character that is neither a space nor letters and numbers?
Whether this space is space or not.
Is the capital letter isupper?
Is the hexadecimal digit (0-9, A-F) character of 16 xdigital?
Character case conversion function is converted to uppercase letter toupper.
Convert to lowercase letter tolower
Header file local.h
Localization: Functions in this category are used to deal with language differences in different countries.
-
Zone control zone setting setlocale
The number format convention queries the format conversion of the country's currency, date, time, etc.
Header file math.h
Mathematical functions: This classification gives various mathematical calculation functions. It must be reminded that the data format in ANSIC standard does not conform to IEEE754 standard, but some C language compilers follow IEEE754 (for example, frinklin C5 1).
-
Anti-cosine acos
Arc string asin
Inverse cheatan
Arctangent 2 atan2
Cosine cosine
Sine sine
Tangent tan
Hyperbolic cosine
Hyperbolic sine
Hyperbolic tangent function
exponential function
Exponential decomposition function frexp
Product exponential function fdexp
natural logarithm
Logarithm 10, radix 10.
Floating-point decomposition function
power function
Square root function
Find the lower bound close to the upper bound of integer.
Juedui wafer factory
Find the upper bound near the lower bound of integer.
Find the remainder
Header file setjmp.h io.h
This classification function is used to jump code directly between different basis functions.
-
Save the calling environment setjmp
Resume calling environment longjmp
Header file signal
Signal processing: this classification function is used to handle the abnormal situation during the execution of the program.
-
Designated signal processing function signal
Send a lifting signal.
Header file stdarg.h
Variable parameter processing: this kind of function is used to realize variable parameter base functions such as printf and scanf scanf.
-
Variable parameter access macro
Variable parameter startup macro va_start
Variable parameter ending macro va_end
The variable parameter access macro accesses the next variable parameter macro va_arg.
Header file stdio.h
I/O functions: This classification is used to handle various I/O devices including files and consoles, and various functions are realized in a "streaming" way.
-
Delete file removal
Modify file name rename
Generate temporary file name tmpfile
Get temporary file path tmpnam
File access closed. File closed.
Refresh buffer fflush
opening file
Connect existing stream pointers and new files to freopen.
Set disk buffer setbuf
Set disk buffer setvbuf
Format input and output functions
Format output fprintf
Format input fscanf
Format output (console) printf
Format input (console) scan f
Format the output to the buffer sprintf
Enter sscanf format from the buffer.
Print format vfprintf
Print format vprintf
Print format vsprintf
Character input and output function
Enter the character fgetc.
String input fgets
Character output fputc
String output fputs
Character input (console)
Character input (console) getchar
String input (console) acquisition
Character output (console)
Character output (console) putchar
String output (console) puts
Characters are output to the header ungetc of the stream.
Direct input and output
Direct stream read operation
Direct stream write operation fwrite
File locating function
Get file location fgetpos
File location moving search
File location setting offset
Get file location ftell
File location reset zero reminder
Error handling function
Error clearing clearerr.
End of file judgment
File error detection
Get the error prompt string perror
Header file standard library
Utility functions: This classification gives some functions that cannot be classified according to the above, but are necessary for programming.
-
String conversion function
Convert a string to an integer atoi
Converts a string to a long integer.
Converts a string to a floating-point number strtod
Converts a string to a long integer.
Converts a string to an unsigned long integer.
Pseudo-random sequence generating function
Generate random number rand
Sets the starting value srand of the random function.
Storage management function
Allocated memory calloc
deallocating memory
Memory allocation malloc
Reassigned memory
Environmental communication
Abort procedure
Exit the program execution and clear the environment variable atexit.
Exit program execution exit
Read environment parameter getenv
The program is suspended and another program system is temporarily executed.
Search and sort tool method of bisection (data must be sorted) search.
Quick sort qsort
Absolute value abs of integer operation function
Get the base quotient and remainder div of division operation.
Find the absolute value of length and shape the bottom laboratory
Find the quotient and remainder ldiv of long shaping division
The multibyte character function gets the number of bytes of multibyte characters.
Gets the number of bytes of multibyte characters mbtowc.
Multibyte character conversion
The string operation of multibyte characters converts multibyte strings into integer arrays mbstowcs.
Converts a multibyte string into a character array mcstowbs.
Header file string.h
String processing: This classification function is used to merge and compare strings.
-
String Copy Block Copy (target and source storage cannot overlap) memcpy
Block copy (target and source storage can overlap) Memory movement
String replication
Copy strncpy by string length
strcat_s
Connect the string strncat by length
String comparison function block comparison memcmp
String comparison strcmp
String comparison (non-English characters)
Compare strncmp and string by length
String conversion strxfrm
Character and string lookup character lookup memory
Character search structure
String lookup strcspn
String lookup strpbrk
String lookup strspn
String lookup strstr
String decomposition string
Miscellaneous function string setting memory set
Error string mapping string error.
Find the string length strlen
Header file time.h
Date and Time Functions: This class provides time and date processing functions.
-
The time operation function obtains the processor clock.
Get the time difference difftime
Set time mktime
Get time time
Time conversion function gets the time of ASCII code.
Gets the time ctime represented by a string.
Gets the time strftime in the specified format.
Serial number library category header file
-
1 error handling error number h
2 character processing.
3 Regionalization
4 mathematical function math.h
5 signal processing signal
6 input and output stdio.h
7 utility stdlib.h
8 string processing string.h