Header and source? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Header and source?

A class will have a header and a source, what's the difference and purpose of each?

27th Oct 2017, 3:15 PM
Joe Nay
Joe Nay - avatar
2 Answers
+ 2
header files are used for better organization of programs. you can define all functions and classes in separate header files and then include them in the source file. the source file will only contain main function so that for changes you can easily go to respective header files and change without going through the source.
27th Oct 2017, 3:40 PM
Sahaj Bamba
Sahaj Bamba - avatar
+ 1
I just had to keep going. it's in the "more inn classes" module
27th Oct 2017, 3:16 PM
Joe Nay
Joe Nay - avatar