Does anyone know how to fix this?
This is my first compiled code in visual code. I Dont really know what to do.
That’s just a warning not an error. If you’re expecting “Hello, world!” to output then that’s because you never executed the program. Compiling the file creates the program, it doesn’t run it.
cl triplex.cpp
This compiles and creates a program called triplex.exe
. To execute it just type it’s name (having .exe is optiontional)
triplex.exe
2 Likes
Also compiling with /EHsc
fixes the warning.
cl triplex.cpp /EHsc
2 Likes
Thank you very much Dan!
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.