Running the program and compiling the program are entirely different things. That command quoted above compiles the program with those two files. Since the output name wasn’t specified it will be named after the first file listed (main.exe)
That’s a terminal that was launched for the build task. Just launch via Debug > Start with(or without) Debugging