Should every C or C++ file have an associated header file?

后端 未结 15 2477
情话喂你
情话喂你 2021-02-04 06:30

Should every .C or .cpp file should have a header (.h) file for it?

Suppose there are following C files :

  1. Main.C

  2. Func1.C

  3. <
15条回答
  •  旧时难觅i
    2021-02-04 07:13

    It depends. Usually your reason for having separate .c files will dictate whether you need separate .h files.

提交回复
热议问题