Because I've made .cpp
files and then transferred them into .h
files, the only difference I can find is that you can't #include
.cpp
files. Is there any difference that I am missing?
The C++ build system (compiler) knows no difference, so it's all one of conventions.
The convention is that .h
files are declarations, and .cpp
files are definitions.
That's why .h
files are #include
d -- we include the declarations.