[SOLVED] Error in using system() for compilation
I am trying to invoke the g++ compiler to generate assembly and preprocessor files for a C++ source code using system(). I have the compiler located in a different drive, and the folder name contains spaces, so I decided to use the following command : "F:\ Files\MinGW GCC 7.2\MinGW\bin\g++.exe" -std=c++17 -S -save-temps "H:\All C++ Files\Rough\Main.cpp" However, when I run the program, I get the following error : " 'F:\' is not recognized as an internal or external command, operable program or batch file. " The command, however, works just as it should when pasted inside cmd. Why does system consider only the F:\ as the specified command? Why does it ignore the rest of the statement? Here is the code being used for the same. https://code.sololearn.com/cbki7Lg0Drb7/#cpp