What's the benefit for a C source file include its own header file

前端 未结 5 1369
隐瞒了意图╮
隐瞒了意图╮ 2020-12-29 07:49

I understand that if a source file need to reference functions from other file then it needs to include its header file, but I don\'t understand why the source file include

5条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-29 08:25

    The header file tells people what the source file can do.

    So the source file for the header file needs to know its obligations. That is why it is included.

提交回复
热议问题