<pre id="bbfd9"><del id="bbfd9"><dfn id="bbfd9"></dfn></del></pre>

          <ruby id="bbfd9"></ruby><p id="bbfd9"><mark id="bbfd9"></mark></p>

          <p id="bbfd9"></p>

          <p id="bbfd9"><cite id="bbfd9"></cite></p>

            <th id="bbfd9"><form id="bbfd9"><dl id="bbfd9"></dl></form></th>

            <p id="bbfd9"><cite id="bbfd9"></cite></p><p id="bbfd9"></p>
            <p id="bbfd9"><cite id="bbfd9"><progress id="bbfd9"></progress></cite></p>
            C語言

            C語言預定義宏用法

            時間:2025-04-15 14:10:02 C語言 我要投稿
            • 相關推薦

            C語言預定義宏用法

              引導語;預定義的宏不采用任何參數,并且不能重新定義。以下是百分網小編分享給大家的C語言預定義宏用法,歡迎閱讀!

              預定義宏

              __DATE__進行預處理的日期(“Mmm dd yyyy”形式的字符串文字)

              __FILE__代表當前源代碼文件名的字符串文字

              __BASE_FILE__獲取正在編譯的源文件名

              __LINE__代表當前源代碼文件中的行號的整數常量

              __TIME__源文件編譯時間,格式為“hh: mm: ss”

              __STDC__設置為 1時,表示該實現遵循 C標準

              __STDC_HOSTED__為本機環境設置為 1,否則設為 0

              __STDC_VERSION__為C99時設置為199901L

              __FUNCTION__或者 __func__ 獲取所在的函數名(預定義標識符,而非預定義宏)

              #include

              int main (void)

              {

              printf ("The file is %s\n", __FILE__);

              printf ("The base_file is %s\n", __BASE_FILE__);

              printf ("The line is %d\n", __LINE__);

              printf ("The function is %s\n", __FUNCTION__);

              printf ("The func is %s\n", __func__);

              printf ("The date is %s\n", __DATE__);

              printf ("The time is %s\n", __TIME__);

              return 0;

              }

              輸出結果:

              The file is part.c

              The base_file is part.c

              The line is 6

              The function is main

              The func is main

              The date is Nov 22 2016

              The time is 15:46:30

            【C語言預定義宏用法】相關文章:

            C語言常用宏定義的用法介紹10-06

            C語言宏定義07-01

            C語言宏定義技巧09-03

            C語言的宏定義分析09-10

            關于C語言宏定義的技巧09-21

            C語言中的預編譯宏定義09-07

            C語言宏定義#define的理解與資料梳理08-29

            C語言中如何定義函數式宏10-24

            簡單講解C語言中宏的定義與使用07-30

                    <pre id="bbfd9"><del id="bbfd9"><dfn id="bbfd9"></dfn></del></pre>

                    <ruby id="bbfd9"></ruby><p id="bbfd9"><mark id="bbfd9"></mark></p>

                    <p id="bbfd9"></p>

                    <p id="bbfd9"><cite id="bbfd9"></cite></p>

                      <th id="bbfd9"><form id="bbfd9"><dl id="bbfd9"></dl></form></th>

                      <p id="bbfd9"><cite id="bbfd9"></cite></p><p id="bbfd9"></p>
                      <p id="bbfd9"><cite id="bbfd9"><progress id="bbfd9"></progress></cite></p>
                      飘沙影院