Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

Could anyone explain ".h" files to me? (description)

+6 votes
asked Jun 9 by Eidnoxon (5,370 points)
reshown Jun 10 by Admin
Hello! I have prioritized learning C++ and Java. I have stumbled upon ".h" files and learned that they are associated with c++. What I know about them is they are for storing classes and variables i think.

Could anyone send me a link to a source code to explain it more clearly to me?

Thanks :)

1 Answer

0 votes
answered Jun 10 by Peter Minarik (89,230 points)
TL;DR; the purpose of the header files is to store type declarations to prevent unnecessary repetitions (and mistakes).

https://learn.microsoft.com/en-us/cpp/cpp/header-files-cpp
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...