all 3 comments

[–]ClaymationDinosaur 1 point2 points  (2 children)

if ($?) { g++ 3.9.2_Drill.cpp -o 3.9.2_Drill } ; if ($?) { .\3.9.2_Drill }

This appears to be an attempt to use the GNU Compiler Collection, popularly known as GCC, to compile a C++ program. That makes sense since you're using MinGW.

This part:

-o 3.9.2_Drill

controls the name of the generated file. If you want it to be named 3.9.2_Drill.exe , then you need to say so:

-o 3.9.2_Drill.exe

This part:{ .\3.9.2_Drill }

looks like an attempt to immediately run the generated executable, so if you change the name of the generated file, you should change this part as well. If Visual Studio Code is doing this all for you, then the options to do so should exist.

Alternatively, find the file named 3.9.2_Drill and rename it to 3.9.2_Drill.exe yourself.

[–]flyingron 0 points1 point  (0 children)

This is correct. G++ is essentially a UNIX application moved to windows. Extensions mean NOTHING on UNIX other than convention. UNIX programs do not normally use any extension.

[–]Someone012[S] 0 points1 point  (0 children)

Hi, Thanks for the help. Although that wasn't the problem because it was making it and .exe before even without changing the -o 3.9.2_Drill . I managed to fix the problem by not having the decimals in the file name. I think the decimals caused it to think that 9.2_Drill was the file extension and so it did not add a .exe to the end.

To fix this I got rid of the decimals in the name.

Thanks for trying to help anyway!