[Solved] How to compile class.cpp and class.hpp to one .o file?


To do so you need to just include class.hpp to you class.cpp file.
It can be done like

#include "class.hpp"

So you just need to have both in same folder and after that you need to add above line in class.cpp and then just compile and run the executable.

solved How to compile class.cpp and class.hpp to one .o file?