count.h
1 #ifndef COUNT_H
2 #define COUNT_H
3 int count(int x);
4 #endif
count.c
1 #include
2 int count(int x)
3 {return 2*x;
}
num.c
1 #include"stdio.h"
2 #include"count.h"
3 int main()
4 {printf("%d\n",count(1));
5 }
}
Makefile:
num : num.c count.h
make之后出错