프리프로세서인 #include에 대한 간단한 실험을 해 보았다.


코드 중간에서 소스코드가 있는 txt파일을 로드해도 전처리 과정에서 include가 처리되기 때문에 정상적으로 컴파일된다.


main.c


#include <stdio.h> int main(void) { #include "source.txt" //'hello world!'가 출력된다. return 0; }

 



source.txt


printf("hello world!\n");

 



https://github.com/tibyte/practice/tree/master/C/include

+ Recent posts