I am new to C++ and I know compilers compile C++ source file into .o file and linker makes the executable file using those .o files (I am not sure about this). And I know g++ -o program.exe program.cpp
compiles C++. So, my questions are:-
Why that command directly make an executable file instead of creating object file?
This command would just compile C++ source file. So, when did I used the linker so that there will be an executable file?
I know it's a dumb question but I searched in google and I found nothing about it.