October 22, 2024
Chicago 12, Melborne City, USA
C#

Real world project structure with .C and .H


So when we make a C program we just need one .C file right? We can include additional C files and H files to our main .C file but I’m not sure what the difference between them is.

Why would one create multiple .C files? Couldn’t they just create a bunch of .H files and include them in the main .C file?

If we include a whole bunch of .H files into the main .C file does that increase the build time? If so then what you would want to do is create a .C file AND a .H file for every "module" you create for the program and then just include the specific .H files where you need them?

I’m just trying to get an idea of how big projects handle it.



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video