在主程序开头要加: #include "xxx.h" 在.h里面要 #ifndef __xxx_H__ #define __xxx_H__ void xxx(unsigned int x); #endif