3 ms·
Headers are used control visibility of declarations (note though that visibility of symbols themselves is controlled by other means), and typically contain more
by berti 8y ago
Headers are used control visibility of declarations (note though that visibility of symbols themselves is controlled by other means), and typically contain more than just function declarations (structs, enums, etc.). There are basically two common patterns to split public and private declarations:
- public header for consumers of the interface, private header for internal use only
- public header for consumers, private declarations directly in the .cpp/.c file