C++ hello world example should not use bad practice #8029
Replies: 3 comments 6 replies
-
@PeterSommerlad I can create this suggestion for you at https://github.com/microsoft/vscode-docs/issues if you'd like, or you're welcome to create another issue there too. |
Beta Was this translation helpful? Give feedback.
-
@PeterSommerlad |
Beta Was this translation helpful? Give feedback.
-
What? std::endl is bad practice now? That is news to me. Where did you find that guideline? The std::endl was supposed account for \r\n on some platforms. I know "using namespace std;" has always been not recommended. |
Beta Was this translation helpful? Give feedback.
-
using
using namespace std;
and outputting a new line withstd::endl
is bad practice in modern C++ and should not be shown to beginners who will think that is the only way to output a new line. it would be better to useas a compile sanity check instead.
https://code.visualstudio.com/docs/languages/cpp#_add-hello-world-source-code
Beta Was this translation helpful? Give feedback.
All reactions