Issue with std cout

I can only get one of them to show up in the terminal. I followed the videos exactly.
-side note the #include did not have an underline when I entered it in VSC.

UPDATE:
I got both std couts to appear in my terminal, but now it is saying (highlighted text at the bottom in the terminal) this occurs whenever i compile:

can I leave it as is? or is there a way to fix it?

2 Likes

Compile with /EHsc

cl triplex.cpp /EHsc
1 Like

Thank you, I’ve got the same warning. Could you please clarify why is this warning even occurs in such a simple program? And what /EHsc does here?

The C++ standard libray uses exceptions and Microsoft’s compiler has to be told how to handle them

1 Like

My compiler is doing the same. Is there some way to fix this beside writing /EHsc every time I run the program

You can create a build task so it does it for you

I have the same problem with my VS code however it is not printing my Hello world at all.
Before or after using /EHsc
When using /EHsc it just skips it completely.
Please help.

It’s not supposed to print hello world. Compiling creates the program. You type the name of the program to execute it.

cl triplex.cpp /EHsc /Zi

That compiles the file triplex.cpp and outputs triplex.exe on successful compilation.

triplex.exe

Would then execute that.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms