- 相關(guān)推薦
C語(yǔ)言頭文件封裝
使用C語(yǔ)言編寫(xiě)程序的時(shí)候,我們往往會(huì )用到很多頭文件,所以小編為大家整理了一個(gè)頭文件封裝,把大部分用到的頭文件都封裝到了自己的命名頭文件中。從此,在頭文件引用時(shí)只需要#include "wsg.h"即可。
需要注意的是,這樣寫(xiě)出來(lái)的代碼別人若沒(méi)有你的這個(gè)頭文件,別人使用不了你的代碼!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | #ifndef _WSG_H_ //if no define----如果沒(méi)有定義xxx(_XXX_H_為格式,XXX內容自己取名)#define _WSG_H_ //馬上定義//ISO C標準定義的頭文件(24項)#include //驗證程序斷言#include //支持復數算術(shù)運算#include //字符類(lèi)型#include //出錯碼#include //浮點(diǎn)環(huán)境#include //浮點(diǎn)常量#include //整型格式轉換#include //替代關(guān)系操作符宏#include //實(shí)現常量#include //局部類(lèi)別#include //數學(xué)常量#include //非局部goto#include //信號#include //可變參數表#include //布爾類(lèi)型和值#include //標準定義#include //整型#include //標準I/O庫#include //實(shí)用程序庫函數#include //字符串操作#include //通用類(lèi)型數學(xué)宏#include //時(shí)間和日期#include //寬字符支持#include //寬字符分類(lèi)和映射支持//POSIX標準定義的必須的頭文件(26項)#include //目錄項#include //文件控制#include //文件名匹配類(lèi)型#include //路徑名模式匹配類(lèi)型#include //組文件#include //網(wǎng)絡(luò )數據庫操作#include //口令文件#include //正則表達式#include //tar歸檔值#include //終端I/O#include //符號常量#include //文件時(shí)間#include //字擴展類(lèi)型#include //Internet定義#include //套接字本地接口#include //Internet地址族#include //傳輸控制協(xié)議#include //內存管理聲明#include //select函數#include //套接字接口#include //文件狀態(tài)#include //進(jìn)程時(shí)間#include //基本系統數據類(lèi)型#include //UNIX域套接字定義#include //系統名#include //進(jìn)程控制//POSIX標準定義的XSI擴展頭文件(26項)#include //cpio歸檔值#include //動(dòng)態(tài)鏈接#include //消息顯示結構#include //文件樹(shù)漫游#include //代碼集轉換實(shí)用程序#include //語(yǔ)言信息常量#include //模式匹配函數定義#include //貨幣類(lèi)型//#include //數據庫操作#include //消息類(lèi)別#include //輪詢(xún)函數#include //搜索表#include //字符串操作#include //系統出錯日志記錄#include //用戶(hù)上下文#include //用戶(hù)限制#include //用戶(hù)帳戶(hù)數據庫#include //IPC#include //消息隊列#include //資源操作#include //信號量#include //共享存儲#include //文件系統信息#include //時(shí)間類(lèi)型#include //附加的時(shí)間#include //矢量I/O操作//POSIX標準定義的可選頭文件(8項)#include //異步I/O#include //消息隊列#include //線(xiàn)程#include //執行調度#include //信號量#include //實(shí)時(shí)spawn接口#include //XSI STREAMS接口//#include //時(shí)間跟蹤 |
【C語(yǔ)言頭文件封裝】相關(guān)文章:
C語(yǔ)言頭文件如何避免重復包含06-01
C語(yǔ)言考點(diǎn)08-11
C語(yǔ)言試題01-23
C語(yǔ)言的元素02-16
C語(yǔ)言運算06-09
C語(yǔ)言文件03-02
C語(yǔ)言試題08-02
C語(yǔ)言試題04-26