As the title suggests, when I use the command prompt to open VS (using ‘CODE’) when I command the program to compile (*.CPP) instead of just compiling as it used to do, it forces my code to open in MS Visual Studio. Not sure why and have no idea how to fix it.
opens that file in the default application for that file extension. It has the same effect as double clicking it in File Explorer.
cl is the command line compiler and you give it files to compile (along with any options)
cl triplex.cpp
Will tell the compiler to compile triplex.cpp and output an executable of the same name i.e. “triplex.exe”. You would then type that to execute the program
triplex.exe
you can omit “.exe” and it’ll mean the same thing.