Linux c/c++开发常用头文件
生活随笔
收集整理的這篇文章主要介紹了
Linux c/c++开发常用头文件
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
c/c++開發常用的頭文件說明,可以詳細參考代碼中的注釋
/************************************************************************** * Copyright (c) 2015-2024 Hybase@qq.com * * Author: hybase@qq.com QQ:23207689 WebChat: hybase * http://blog.csdn.net/zymill * http://github.com/zymill * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * ***************************************************************************** */ //!c標準常用頭文件 #include <stdio.h> //fopen/fwrite/fread/fprintf/printf/scanf等io函數 #include <stdlib.h> //strtol/atoi/malloc/free/rand/abs等 #include <stdarg.h> //va_start/va_end/va_arg #include <stddef.h> //常用常量 #include <string.h> //memcpy/memset/strcpy/strlen/strncpy字符串等#include <math.h> //sin/cos/pow/sqrt/ceil/floor等數學函數 #include <time.h> //定義關于時間的函數 #include <ctype.h> //字符isdigit/islower/tolower/toupper等 #include <assert.h> //斷言 #include <errno.h> //錯誤碼相關 #include <malloc.h> //內存相關 #include <wchar.h> //寬字符處理及輸入/輸出 #include <wctype.h> //寬字符分類 #include <float.h> //浮點數處理 #include <iso646.h> //對應各種運算符的宏 #include <limits.h> //定義各種數據類型最值的常量 #include <locale.h> //定義本地化C函數 #include <setjmp.h> //異常處理支持setjmp/longjmp #include <signal.h> //信號機制支持signal/raise//!C99增加的部分 #include <complex.h> //復數處理 #include <fenv.h> //浮點環境 #include <inttypes.h> //整數格式轉換 #include <stdbool.h> //布爾環境 #include <stdint.h> //整型環境 #include <tgmath.h> //通用類型數學宏//===================================== //! 標準c++ #include <algorithm> //STL通用算法 #include <bitset> //STL位集容器 #include <map> //STL映射容器 #include <list> //STL線性列表容器 #include <vector> //STL動態數組容器 #include <queue> //STL隊列容器 #include <set> //STL集合容器 #include <deque> //STL雙端隊列容器 #include <memory> //STL通過分配器進行的內存分配 #include <numeric> //STL常用的數字操作 #include <stack> //STL堆棧容器 #include <iterator> //STL迭代器 #include <utility> //STL通用模板類 #include <functional> //STL定義運算函數(代替運算符) #include <cctype> //字符處理 #include <cerrno> //定義錯誤碼 #include <cfloat> //浮點數處理 #include <ciso646> //對應各種運算符的宏 #include <climits> //定義各種數據類型最值的常量 #include <clocale> //定義本地化函數 #include <cmath> //定義數學函數 #include <complex> //復數類 #include <csignal> //信號機制支持 #include <csetjmp> //異常處理支持 #include <cstdarg> //不定參數列表支持 #include <cstddef> //常用常量 #include <cstdio> //定義輸入/輸出函數 #include <cstdlib> //定義雜項函數及內存分配函數 #include <cstring> //字符串處理 #include <ctime> //定義關于時間的函數 #include <cwchar> //寬字符處理及輸入/輸出 #include <cwctype> //寬字符分類 #include <exception> //異常處理類 #include <fstream> //文件輸入輸出 #include <limits> //定義各種數據類型最值常量 #include <locale> //本地化特定信息 #include <new> //動態內存分配 #include <iomanip> //參數化輸入輸出 #include <ios> //基本輸入輸出支持 #include <iosfwd> //輸入輸出系統使用的前置聲明 #include <iostream> //數據流輸入輸出 #include <istream> //基本輸入流 #include <ostream> //基本輸出流 #include <sstream> //基于字符串的流 #include <stdexcept> //標準異常類 #include <streambuf> //底層輸入輸出支持 #include <string> //字符串類 #include <typeinfo> //運行期間類型信息 #include <valarray> //對包含值的數組的操作//================================================ //! Linux系統頭文件 #include <unistd.h> //chown/write/read/fsync/sleep/usleep/getpid等 #include <aio.h> //異步I/O #include <mqueue.h> //消息隊列 #include <pthread.h> //線程 #include <sched.h> //執行調度 #include <semaphore.h> //信號量 #include <spawn.h> //實時spawn接口 #include <stropts.h> //XSI STREAMS接口 #include <trace.h> //事件跟蹤 #include <inttypes.h> //uint32_t/int64_t等 #include <signal.h> //信號機制 #include <fcntl.h> //open/create/fcntl等文件控制 #include <fnmatch.h> //文件名匹配類型 #include <getopt.h> //處理命令行參數。getopt() #include <glob.h> //路徑名模式匹配類型 #include <grp.h> //組文件 #include <netdb.h> //主機信息相關函數如:gethostbyname #include <pwd.h> //口令文件 #include <regex.h> //正則表達式 #include <tar.h> //TAR歸檔值 #include <termios.h> //終端I/O #include <utime.h> //文件時間 #include <wordexp.h> //字符擴展類型#include <arpa/inet.h> //提供IP地址轉換函數inet_addr,inet_aton #include <net/if.h> //套接字本地接口 #include <net/ethernet.h> //以太網數據結構:ether_addr,ether_header等 #include <net/if_arp.h> //ether_arp的數據結構 #include <netinet/in.h> //數據結構sockaddr_in、函數htons等 #include <netinet/ip.h> //和linux/ip.h相似,有iphdr數據結構,同時還包括timestamp結構 #include <netinet/tcp.h> //TCP協議定義 #include <netinet/udp.h> //UDP協議定義#include <sys/ioctl.h> //提供對I/O控制的函數 #include <sys/param.h> //MAXHOSTNAMELEN/MAXDOMNAMELEN等定義 #include <sys/reboot.h> //系統重啟 #include <sys/mount.h> //系統mount #include <sys/mman.h> //內存管理聲明 #include <sys/select.h> //Select函數 #include <sys/socket.h> //套接字 #include <sys/epoll.h> //epoll事件 #include <sys/stat.h> //文件狀態 #include <sys/times.h> //進程時間 #include <sys/types.h> //基本系統數據類型 #include <sys/un.h> //UNIX域套接字定義 #include <sys/utsname.h> //系統名 #include <sys/wait.h> //進程等待控制 #include <sys/ipc.h> //IPC(命名管道) #include <sys/msg.h> //消息隊列 #include <sys/resource.h> //資源操作 #include <sys/sem.h> //信號量 #include <sys/shm.h> //共享存儲 #include <sys/statvfs.h> //文件系統信息 #include <sys/time.h> //時間類型 #include <sys/timeb.h> //附加的日期和時間定義 #include <sys/uio.h> //矢量I/O操作 #include <linux/reboot.h> //系統重啟 #include <linux/if_ether.h> //結構體 struct ethhdr #include <linux/if_packet.h> //原始數據包的數據結構定義,包括sockaddr_pkt,sockaddr_ll #include <linux/fb.h> //framebuffer #include <linux/ethtool.h> //ethtool函數 #include <linux/sockios.h> //socket #include <linux/prctl.h> //prctl 進程控制 #include <dirent.h> //目錄函數opendir/closedir/readdir/readdir64等//! 其他擴展頭文件 #include <cpio.h> //cpio歸檔值 #include <dlfcn.h> //動態鏈接 #include <fmtmsg.h> //消息顯示結構 #include <ftw.h> //文件樹漫游 #include <iconv.h> //代碼集轉換使用程序 #include <langinfo.h> //語言信息常量 #include <libgen.h> //模式匹配函數定義 #include <monetary.h> //貨幣類型 #include <ndbm.h> //數據庫操作 #include <nl_types.h> //消息類別 #include <poll.h> //輪詢函數 #include <search.h> //搜索表 #include <strings.h> //字符串操作 #include <syslog.h> //系統出錯日志記錄 #include <ucontext.h> //用戶上下文 #include <ulimit.h> //用戶限制 #include <utmpx.h> //用戶帳戶數據庫總結
以上是生活随笔為你收集整理的Linux c/c++开发常用头文件的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 密码学 SM3算法 Python实现
- 下一篇: ANSYS ICEM CFD 网格划分步