I don\'t quite understand how things should be separated in C\'s source and header files. I often see many projects with two sets of files with the same name (sans the exten
What should be in headers and what should be in the source files?
Typically headers contain one or more of the following:
struct
, union
etc.)Source files on the other hand have:
How do I implement this separation?
The One Definition Rule is your friend.
Remember, if you are writing a library, this is what your client gets to see. So, be helpful and provide all the information you can for them to use your library. The source files are typically compiled and supplied in binary form.
And by the way, C does not have the concept of classes.