+ 2

What is difference between source and header

15th Nov 2016, 5:36 AM
Anz Mohammad
Anz Mohammad - avatar
5 Answers
+ 12
Header (.h) files should not contain any code (if they don't contain information about a C++ templated object). They contain function prototypes, typedefs, #define statements that are used by the source files that include them. Source (.c) files contain the source code implementation of the functions that were prototyped in the appropriate header file.
15th Nov 2016, 5:47 AM
LyannaM
LyannaM - avatar
+ 1
Header files (.h / .hpp) contains all your class, structure, typedef and function declarations while Source files(.c / .cpp) contains all your function definitions.
15th Nov 2016, 6:49 PM
Franky BrainBox
Franky BrainBox - avatar
+ 1
hallo leute
20th Nov 2016, 7:01 PM
bekim mema
bekim mema - avatar
0
alii
16th Nov 2016, 6:38 AM
ali.shiraz
ali.shiraz - avatar
- 4
Header (.h) files should not contain any code (if they don't contain information about a C++ templated object). They contain function prototypes, typedefs, #define statements that are used by the source files that include them. Source (.c) files contain the source code implementation of the functions that were prototyped in the appropriate header file.
16th Nov 2016, 6:37 AM
ali.shiraz
ali.shiraz - avatar