Because c++ doesn't have the concept of export modules definitions. If you want to expose a function or a class so other .cpp (modules) can access to it you have to forward declare them in a .h file. Why not write the entire functions (definition) and classes inside the .h instead of forward declare them and write down in a .cpp file? Because when you do #include it pretty much includes the content of the entire .h file in the .cpp so if you include it in all the .cpp files you have, it will be compiled repetitively in each .cpp. which could be extremely inefficient. So you only want forward declaration in a .h and all the definitions in a .cpp.