當前位置:首頁 » 編程軟體 » 編譯時加入以下命令c99

編譯時加入以下命令c99

發布時間: 2023-06-29 18:40:24

『壹』 dev c 源文件未編譯

devc源文件未編譯的方法。

如下參考:

1.首先,打開dev-c++,點擊菜單欄中的「工具」,點擊「編輯/翻譯選項」,打開編譯選項對話框。

『貳』 如何知道當前編譯器是否是C99標準的有什麼指令可以查到

#include<stdio.h>
int main()
{
#if (!defined(__STDC__))
printf("非標准C!");
#elif defined(__STDC_VERSION__)
printf("標准C版本:%ld。", __STDC_VERSION__);
#else
printf("舊的標准C。");
#endif
getchar();
return 0;
}
預定義宏__STDC__表示標准C。__STDC_VERSION__表示標准C版本。C99對應的是199901L。
(注意有些編譯器默認沒有定義__STDC_VERSION__,甚至沒定義__STDC__。所以查編譯器手冊更保險一點。)
====
[原創回答團]

『叄』 如何設置GCC支持C99

你用的IDE應該是Code::Blocks。我用的是10.05版本,在setting中選擇compiler and debugger,然後選擇compile flags旁邊的Other options, 輸入-std=c99。當然,用這種方法需要去掉源程序里的gcc -std=c99……那一行。或者不使用Code::Blocks,直接在命令行中輸入gcc -std=c99……那一行,也是可以的。

『肆』 有幾個關於dev編譯器的問題。。。

  1. dev不是一個編譯器,dev是一個IDE。弄清楚IDE和編譯器的區別。dev自帶的編譯器是TDM-GCC,當然你也可以指定別的。TDM-GCC支持C99。

  2. 工具->編譯選項->編譯時加入以下命令:-std=c99

  3. GNU C99=ISO C99+GNU擴展(函數庫)。

『伍』 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語言源文件未編譯怎麼解決

解決方法如下:

操作設備:戴爾筆記本電腦

操作系統:win10

操作程序:DEV-C++ v2.01

1、首先我們打開DEV-C++,點擊菜單欄中的「工具」,點擊「編譯選項」這個選項,打開編譯選項對話框。

熱點內容
java架構師做什麼 發布:2025-02-08 07:38:32 瀏覽:771
java解碼器 發布:2025-02-08 07:25:35 瀏覽:295
p4忘記密碼了如何刷機 發布:2025-02-08 07:25:25 瀏覽:305
java分隔 發布:2025-02-08 07:15:02 瀏覽:812
源碼乘法豎式 發布:2025-02-08 07:05:48 瀏覽:136
天天酷跑腳本腳本精靈 發布:2025-02-08 07:05:15 瀏覽:345
ios資料庫遷移 發布:2025-02-08 07:00:16 瀏覽:851
安卓sdl是什麼 發布:2025-02-08 07:00:05 瀏覽:908
離線腳本怎麼寫 發布:2025-02-08 06:59:22 瀏覽:832
java學習價錢 發布:2025-02-08 06:58:39 瀏覽:958