What does #include actually do?

后端 未结 6 1525
广开言路
广开言路 2020-12-15 04:25

In C (or a language based on C), one can happily use this statement:

#include \"hello.h\";

And voila, every function and variable in

6条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-15 04:47

    That (copy/paste) is exactly what #include "header.h" does.

    Note that it will be different for #include or when the compiler can't find the file "header.h" and it tries to #include instead.

提交回复
热议问题