I have these files: classA.cpp, classA.h, classB.cpp, classB.h, and main.cpp.
All needed libraries are included in both .h files.
In main.cpp I include classA.cpp and classB.cpp.
In classB.cpp I include classB.h and in classA.cpp it is classA.h
I compile it by
g++ main.cpp
(+some unimportant stuff) and it is working perfectly.
But I am almost certainly sure, that on our lectures we were told to do that differently, sadly I can't find it now.
Is this the best way of including and compiling? If not, what is?