?? 頭文件:my.txt
字號:
/* 頭文件:my_Include.h */
#include <stdio.h> /* 展開C語言的內建函數指令 */
#define PI 3.1415926 /* 宏常量,在稍后章節再詳解 */
#define circle(radius) (PI*radius*radius) /* 宏函數,圓的面積 */
/* 將比較數值大小的函數寫在自編include文件內 */
int show_big_or_small (int a,int b,int c)
{
int tmp;
if (a>b)
{
tmp = a;
a = b;
b = tmp;
}
if (b>c)
{
tmp = b;
b = c;
c = tmp;
}
if (a>b)
{
tmp = a;
a = b;
b = tmp;
}
printf("由小至大排序之后的結果:%d %d %d\n", a, b, c);
}
程序執行結果:
由小至大排序之后的結果:1 2 3
可將內建函數的include文件展開在自編的include文件中
圓圈的面積是=201.0619264
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -