How are header files important? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How are header files important?

5th Sep 2017, 12:10 PM
Nitin Kumar Sharma
Nitin Kumar Sharma - avatar
2 Answers
+ 6
I am new in c++,but I have already been using them for modular programming, that is I write some ferquently used functions inside a header file and use the header file whenever i need those functions.
5th Sep 2017, 12:18 PM
Vahid Shirbisheh
Vahid Shirbisheh - avatar
+ 1
a header file is basically text that is to be copied places before compile. That's why it uses #(preprocessor command) to include a header. I usually use -function declarations -structs -classes(functions in .cpp) -defines -other includes inside of my headers but in the end just remember it's just pasted code.
5th Sep 2017, 2:09 PM
Jordan Chapman
Jordan Chapman - avatar