範例碼(一):C/C++ 語言,自訂函數及標頭檔,範例如下,主程式 main.c 檔。
#include <stdio.h> #include <stdlib.h> /* * include "自製標頭檔.h" */ #include "./str.h" /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int main(int argc, char *argv[]) { char *receive=str_include(); printf("%s",receive); printf("%s",str_include()); int send_parament=100; printf("%d",int_include(send_parament)); return 0; }