多個.h和.c文件的使用

func.h

#ifndef FUNC_H
#define FUNC_H

int f();

#endif

 

func.c

#include "func.h"

int f(){
 return 1;
}

 

Test.c

#include <stdio.h>
#include "func.h"

int main(){
 int i=f();
 printf("%d",i);
}

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章