终于跑起来了,含自定义 include .h 的c语言程序,超开心呀!
header files contain prototypes for functions you define in a .c or .cpp/.cxx file (depending if you're using c or c++).
You want to place #ifndef/#defines around your .h code so that if you include the same .h twice in different parts of your programs, the prototypes are only included once
这本c语言的书不错,学习之,加油!!! http://publications.gbdirect.co.uk/c_book/chapter1/functions.html
参考:http://*.com/questions/7109964/creating-your-own-header-file-in-c
foo.h
foo.c
main.c
To compile using GCC
|