目前分類:Coda (2)

瀏覽方式: 標題列表 簡短摘要

#include(檔 入)

-- def.h 的檔案內容 --
 
         #define PI  3.14159
         #define a   10
         #define b   20

 

#include < stdio.h >
  #include "def.h"
  
main()
  {
            printf("PI=%2.5f\n",PI);
            printf("a+b=%d\n",a+b);
 }
執行結果 :
 
             PI=3.14159
             a+b=30

 

tear2001 發表在 痞客邦 留言(0) 人氣()

#include < stdio.h > ----> 前置處理

 int x=123; ----> global variable

tear2001 發表在 痞客邦 留言(0) 人氣()