Do I need to compile the header files in a C program?

前端 未结 5 887
生来不讨喜
生来不讨喜 2020-12-23 12:32

Sometimes I see someone compile a C program like this:

gcc -o hello hello.c hello.h

As I know, we just need to put the header files into the C p

5条回答
  •  心在旅途
    2020-12-23 13:05

    You don't need to compile header files. It doesn't actually do anything, so there's no point in trying to run it. However, it is a great way to check for typos and mistakes and bugs, so it'll be easier later.

提交回复
热议问题