What will happen if I don't include header files

前端 未结 5 2047
误落风尘
误落风尘 2020-12-06 08:08

What will happen if I don\'t include the header files when running a c program? I know that I get warnings, but the programs runs perfectly.

I know that the header f

5条回答
  •  温柔的废话
    2020-12-06 08:37

    There are a lot of things you can't do if you leave out headers:

    (I'm hoping to get some more from the comments since my memory is failing on this ...)

    • You can't use any of the macros defined in the headers. This can be significant.
    • The compiler can't check that you are calling functions properly since the headers define their parameters for it.

提交回复
热议问题