보통 .h 파일만 include 하던데, .c파일을 include 하는것도 가능할까? 에 대해 실습해보자.
#include "cow.h"
#include "pig.c" // (1) pig.h가 아닌 pig.c를 추가하자.
#include "diary.txt" // (2) .txt 파일을 가져올수는 있다. 컴파일시 에러(X), 빌드시 에러(O)
void meow() { // 고양이,야옹
}
void woof() { // 강아지,멍멍
}
int main() {
meow();
woof();
moo();
return (0);
}
void moo() { // 소, 음메
}
void oink() { // 돼지, 꿀꿀
printf("꿀꿀\\r\\n");
}
The last time I met my friend was last Sunday.
I don’t really like going out on a Sunday,
because I want to take a rest as much as I can before I go to work on Monday,
but my friend who lives in the same neighbourhood called me.
▼ 출처