I am new to C++ and suppose I have three files main.cpp
, test.cpp
and test.h
.
The main.cpp
file includes the test.h
header file.
Now to successfully compile the files I am using the following command:
g++ main.cpp test.cpp -o main.exe
Is there a way to only supply main.cpp
and the compiler would automatically compile all the required files?
Thank you.