I\'ve just inherited some C++ code that was written poorly with one cpp file which contained the main and a bunch of other functions. There are also .h files th
.h
To compile separately without linking you need to add -c option:
-c
g++ -c myclass.cpp g++ -c main.cpp g++ myclass.o main.o ./a.out