What is the difference between a .cpp file and a .h file?

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 #included — we include the declarations.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)