跳到主要内容

📖 C++语言 参考手册

📖 C++语言 参考手册

C++ <cmath> 数学函数库

  1. C++ cos() 余弦函数 C++ cos()Returns Cosine of the Argument
  2. C++ sin() 正弦函数 C++ sin()Returns Sine of the Argument
  3. C++ asin() 反正弦函数 C++ asin()Returns Inverse Sine a Number
  4. C++ atan() 反正切函数 C++ atan()Returns Inverse tangent a Number
  5. C++ tan() 正切函数 C++ tan()Returns Tangent of the Argument
  6. C++ atan2() 二参数反正切函数 C++ atan2()Returns Inverse Tangent of a Coordinate
  7. C++ acos() 反余弦函数 C++ acos()Returns Inverse cosine a Number
  8. C++ ceil() 向上取整函数 C++ ceil()Return ceiling value of number
  9. C++ floor() 向下取整函数 C++ floor()Returns floor value of decimal number
  10. C++ fmod() 浮点数取余函数 C++ fmod()Computes floating point remainder of division
  11. C++ log() 自然对数函数 C++ log()Returns Natural Logarithm of a Number
  12. C++ round() 四舍五入函数 C++ round()Returns integral value nearest to argument
  13. C++ trunc() 截断函数 C++ trunc()Truncates the demical part of a number
  14. C++ log10() 以10为底的对数函数 C++ log10()Returns Base 10 Logarithm of a Number
  15. C++ modf() 分解浮点数函数 C++ modf()Breaks Number Into Integral and Fractional Part
  16. C++ exp() 指数函数 C++ exp()returns exponential (e) raised to a number
  17. C++ log2() 以2为底的对数函数 C++ log2()returns base2 logarithm of a number
  18. C++ sqrt() 平方根函数 C++ sqrt()Computes Square Root of A Number
  19. C++ fmax() 最大值函数 C++ fmax()returns largest among two arguments passed
  20. C++ nan() 函数 C++ nan()returns a quiet NaN value
  21. C++ fabs() 函数 C++ fabs()Returns absolute value of argument
  22. C++ cmath abs() 函数 C++ cmath abs()Returns absolute value of an argument
  23. C++ remainder() 函数 C++ remainder()Returns remainder of x/y
  24. C++ pow() 函数 C++ pow()Computes Power a Number

C++ <cstdlib>> 库

  1. C++ atof() 函数 C++ atof()Converts String to Double
  2. C++ strtol() 函数 C++ strtol()Converts a string to number
  3. C++ strtoull() 函数 C++ strtoull()converts string to unsigned long long int
  4. C++ srand() 函数 C++ srand()Seeds pseudo random number for rand()
  5. C++ free() 函数 C++ free()deallocates a block of memory
  6. C++ malloc() 函数 C++ malloc()Allocates a block of unitialized memory
  7. C++ realloc() 函数 C++ realloc()reallocates a block of previously allocated memory
  8. C++ getenv() 函数 C++ getenv()returns pointer to environment variable passed
  9. C++ bsearch() 函数 C++ bsearch()performs binary search on sorted array
  10. C++ qsort() 函数 C++ qsort()sorts array using quick-sort algorithm
  11. C++ div() 函数 C++ div()computes integral quotient and remainder of number
  12. C++ cstdlib abs() 函数 C++ cstdlib abs()Returns absolute value of an integer
  13. C++ labs() 函数 C++ labs()returns absolute value of long or long int number
  14. C++ calloc() 函数 C++ calloc()allocates block of memory and initializes to zero

C++ <iostream>

  1. C++ cin 流 C++ cinaccepts input from the user
  2. C++ cout 流 C++ coutdisplays output to output device i.e monitor
  3. C++ cerr 流 C++ cerrWrites to error stream
  4. C++ clog 流 C++ clogused for streaming logs
  5. C++ wcin 流 C++ wcinaccepts input in wide character type
  6. C++ wcout 流 C++ wcoutdisplays wide characters (Unicode) to screen

C++ <cstring>

  1. C++ memcpy() 函数 C++ memcpy()Copies block of memory from source to destination
  2. C++ strncpy() 函数 C++ strncpy()copies character string from source to destination
  3. C++ strcat() 函数 C++ strcat()appends copy of string to end of another string
  4. C++ strcpy() 函数 C++ strcpy()Copies character string from source to destination
  5. C++ strcmp() 字符串比较函数 C++ strcmp()Compare two strings
  6. C++ strncmp() 字符串长度比较函数 C++ strncmp()compares two strings lexographically
  7. C++ strchr() 查找字符在字符串中的位置 C++ strchr()searches for character in string
  8. C++ strstr() 查找子串在字符串中的位置 C++ strstr()finds first occurrence of a substring in string
  9. C++ strtok() 字符串分割函数 C++ strtok()Split string based on delimiter
  10. C++ memset() 内存设置函数 C++ memset()copies character to beginning of string n times
  11. C++ strlen() 计算字符串长度 C++ strlen()Returns length of given string

C++ <cctype> 字符类型函数库

  1. C++ isalpha() 判断字符是否为字母 C++ isalpha()checks if given character is alphabet or not
  2. C++ isblank() 判断字符是否为空白 C++ isblank()checks if given character is a blank character
  3. C++ isdigit() 判断字符是否为数字 C++ isdigit()Checks if given character is a digit or not
  4. C++ islower() 判断字符是否为小写字母 C++ islower()checks if given character is lowercase
  5. C++ ispunct() 判断字符是否为标点符号 C++ ispunct()check if given character is punctuation character
  6. C++ isspace() 判断字符是否为空格 C++ isspace()check if given character is whitespace character
  7. C++ isupper() 判断字符是否为大写字母 C++ isupper()check if given character is uppercase or not
  8. C++ isxdigit() 判断字符是否为十六进制数字 C++ isxdigit()checks if given character is hexadecimal character
  9. C++ tolower() 将字符转换为小写 C++ tolower()Converts a given character to lowercase
  10. C++ toupper() 将字符转换为大写 C++ toupper()Converts a given character to uppercase

C++ <cstdio> 标准输入输出库

  1. C++ remove() 删除文件函数 C++ remove()Deletes the specified file
  2. C++ rename() 重命名文件函数 C++ rename()renames or moves specified file
  3. C++ tmpfile() 创建临时文件函数 C++ tmpfile()creates temporary file with auto-generated name
  4. C++ fopen() 打开文件函数 C++ fopen()opens specified file
  5. C++ scanf() 标准输入函数 C++ scanf()Read data form stdin
  6. C++ fprintf() 格式化输出到文件 C++ fprintf()write a formatted string to file stream
  7. C++ fscanf() 从文件读取格式化输入 C++ fscanf()read data from file stream
  8. C++ printf() 函数 C++ printf()Write formatted string to stdout
  9. C++ snprintf() 函数 C++ snprintf()write formatted string to character string buffer
  10. C++ sprintf() 函数 C++ sprintf()Write a formatted string to buffer
  11. C++ sscanf() 函数 C++ sscanf()read data from string buffer
  12. C++ fgets() 函数 C++ fgets()reads n number of characters from file stream
  13. C++ fgetc() 函数 C++ fgetc()reads the next character from given input stream
  14. C++ getchar() 函数 C++ getchar()reads next character from stdin
  15. C++ gets() 函数 C++ gets()reads line from stdin
  16. C++ putchar() 函数 C++ putchar()writes a character to stdout
  17. C++ puts() 函数 C++ puts()writes string to stdout
  18. C++ fread() 函数 C++ fread()reads specified no. of characters from stream
  19. C++ fwrite() 函数 C++ fwrite()writes specified number of characters to stream
  20. C++ fflush() 函数 C++ fflush()flushes any buffered data to the respective device
  21. C++ freopen() 函数 C++ freopen()opens a new file with stream associated to another
  22. C++ fseek() 函数 C++ fseek()sets file position indicator for given file stream
  23. C++ getc() 函数 C++ getc()reads next character from input stream

C++ <ctime>

  1. C++ clock() 函数 C++ clock()returns processor time consumed by program
  2. C++ difftime() 函数 C++ difftime()computes difference between two times in seconds
  3. C++ time() 函数 C++ time()Returns current calendar time
  4. C++ asctime() 函数 C++ asctime()converts calendar time to character representation
  5. C++ ctime() 函数 C++ ctime()converts time since epoch to char representation
  6. C++ gmtime() 函数 C++ gmtime()converts given time since epoch to UTC time
  7. C++ localtime() 函数 C++ localtime()converts given time since epoch to local time
  8. C++ strftime() 函数 C++ strftime()converts calendar time to multibyte character str