I have seen in many libraries which contains two files one is .H file and another is a .CPP file. .h is a header file which contains function prototype and .CPP contains actual c++ code for every function in header file.
I want to ask that can I make a single .h file and write all c++ functions and class in it. And include that .h file when ever it is necessary in main.cpp