導航:首頁 > 源碼編譯 > c預編譯關鍵字

c預編譯關鍵字

發布時間:2023-10-20 07:52:42

① C語言預編譯命令

#include <assert.h> //設定插入點
#include <ctype.h> //字元處理
#include <errno.h> //定義錯誤碼
#include <float.h> //浮點數處理
#include <fstream.h> //文件輸入/輸出
#include <iomanip.h> //參數化輸入/輸出
#include <iostream.h> //數據流輸入/輸出
#include <limits.h> //定義各種數據類型最值常量
#include <locale.h> //定義本地化函數
#include <math.h> //定義數學函數
#include <stdio.h> //定義輸入/輸出函數
#include <stdlib.h> //定義雜項函數及內存分配函數
#include <string.h> //字元串處理
#include <strstrea.h> //基於數組的輸入/輸出
#include <time.h> //定義關於時間的函數
#include <wchar.h> //寬字元處理及輸入/輸出
#include <wctype.h> //寬字元分類

//////////////////////////////////////////////////////////////////////////

標准 C++ (同上的不再注釋)

#include <algorithm> //STL 通用演算法
#include <bitset> //STL 位集容器
#include <cctype>
#include <cerrno>
#include <clocale>
#include <cmath>
#include <complex> //復數類
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque> //STL 雙端隊列容器
#include <exception> //異常處理類
#include <fstream>
#include <functional> //STL 定義運算函數(代替運算符)
#include <limits>
#include <list> //STL 線性列表容器
#include <map> //STL 映射容器
#include <iomanip>
#include <ios> //基本輸入/輸出支持
#include <iosfwd> //輸入/輸出系統使用的前置聲明
#include <iostream>
#include <istream> //基本輸入流
#include <ostream> //基本輸出流
#include <queue> //STL 隊列容器
#include <set> //STL 集合容器
#include <sstream> //基於字元串的流
#include <stack> //STL 堆棧容器
#include <stdexcept> //標准異常類
#include <streambuf> //底層輸入/輸出支持
#include <string> //字元串類
#include <utility> //STL 通用模板類
#include <vector> //STL 動態數組容器
#include <cwchar>
#include <cwctype>

using namespace std;

//////////////////////////////////////////////////////////////////////////

C99 增加

#include <complex.h> //復數處理
#include <fenv.h> //浮點環境
#include <inttypes.h> //整數格式轉換
#include <stdbool.h> //布爾環境
#include <stdint.h> //整型環境
#include <tgmath.h> //通用類型數學宏

② c語言程序,預編譯的作用是什麼

預編譯又稱為預處理 , 是做些代碼文本的替換工作。
處理 # 開頭的指令 ,
比如拷貝 #include 包含的文件代碼,
#define 宏定義的替換 , 條件編譯等,
就是為編譯做的預備工作的階段,主要處理#開始的預編譯指令,預編譯指令指示了在程序正式編譯前就由編譯器進行的操作,可以放在程序中的任何位置。
c 編譯系統在對程序進行通常的編譯之前,先進行預處理。 c 提供的預處理功能主要有以下三 種:
1)宏定義 #definemin(a,b)((a)>(b)?(b)::(a))
2 )文件包含 如:#include<stdio.h>
3 )條件編譯#ifndefGRAPHICS_H
#defineGRAPHICS_H
*****
#endif

#ifdefGRAPHICS_H
*****
#else
*****
#endif

閱讀全文

與c預編譯關鍵字相關的資料

熱點內容
ch編譯器 瀏覽:446
java必須自己寫一個編譯器嗎 瀏覽:934
如何製作androidrom 瀏覽:466
單片機萬能板怎麼寫入程序 瀏覽:16
邁銳寶xl壓縮比 瀏覽:336
靠演算法買彩票 瀏覽:495
程序員考核d 瀏覽:239
自助游中國pdf 瀏覽:744
安卓p40是什麼手機 瀏覽:85
24cxx編程器 瀏覽:589
陰陽師如何查看哪個伺服器有ID 瀏覽:314
公務員照片壓縮 瀏覽:456
編譯的時候怎麼找未定義的函數 瀏覽:350
有什麼我的世界伺服器 瀏覽:304
伺服器亮綠燈是什麼意思 瀏覽:635
python畫的圖如何保存高清版 瀏覽:497
10的搭接還用加密嗎 瀏覽:371
bytedance這個文件夾是什麼意思呢 瀏覽:594
演算法站的客體 瀏覽:82
src文件夾c語言怎麼運行 瀏覽:29