Compiling c++ multiple sources file

0
c++ multiple sources file compiling using g++ is easy but it requires a little manual works. Multiple source file compiling can be more easy and straight using make file. But i will give here only a simple example. If you think you need  example of makefile too then you can Google search or write comments and i will update this post!

Hope you already understand the basic of c++ like functions,class etc.

C++ source file one

C++ source file two

I declared object name of the class called “Test“.
t is variable declared in the header file so tt.t mean “use the variable from class Test!”.
You can write any valid code in the function or in c++ Class method!

C++ Header file

It is just simple compiling the sources using g++ :

Thanks for reading!