Posted February 9Feb 9 I wanted to use VS Code with the MS C/C++ Extension for some C++ teaching. In the process, I discovered that setting the C++ language standard to build your C++ code is not as easy and intuitive as one would expect. I discussed the details in this article: VS Code with MS C/C++ Extension: A Confusing UI Design Choice by Giovanni Dicanio From the article: I pressed Ctrl+Shift+P, selected C/C++ Edit Configurations (UI), and in the C/C++ Configurations page, selected c++20 for the C++ standard. Then I pressed F5 to start a debugging session, preceded by a build process, and saw that the build process failed. I took a look at the error message in the terminal window, and to my surprise the error messages were telling me that some libraries (like <span>) were available only with C++20 or later. But I had just selected the C++20 standard a few minutes ago!  View the full article
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.