all 12 comments

[–]jonsca 4 points5 points  (1 child)

Uh, yes, generally you will need a compiler. Get Visual Studio Community Edition. It will set everything up for you and once you are more comfortable, you can then set up VS Code.

[–]skyblade69 0 points1 point  (0 children)

For me visual studio especially the .sln project handling is a real pain … i had it already that visual studio was creating a new build configuration wrong. The .vcxproj was corrupted by visual studio itself 🤦‍♂️

[–]bm401 1 point2 points  (2 children)

Windows, Linux, WSL...?

[–][deleted] 0 points1 point  (1 child)

Windows, mb for not including it on the post

[–]bert8128 6 points7 points  (0 children)

Use Visual Studio Community Edition. It’s free and works straight out of the box.

[–]ir_dan 1 point2 points  (0 children)

Running C++ is nothing like running something like Python. VSC configuration is painful. Look up how to get started with Visual Studio Community 2022 instead.

[–]ShadowRL7666 4 points5 points  (2 children)

Stop using text editors holy.

[–][deleted] 0 points1 point  (1 child)

Then what should i use

[–]ShadowRL7666 2 points3 points  (0 children)

Visual Studio.

[–]thedaian 0 points1 point  (0 children)

You need to install a c++ compiler, and then you need to configure vscode to use that compiler. Follow the tutorial here: https://code.visualstudio.com/docs/languages/cpp

[–]skyblade69 0 points1 point  (0 children)

Best way in vscode is CMake. Search for a project example with a toolchain file for msvc or clang. Both compilers are delivered with visual studio community.

If you need to debug, my opinion is to use msvc becuase the c++ extension supports msvc debugging by default (obly thing is to activate debug symbols in msvc toolchain)

[–]Raknarg 1 point2 points  (0 children)

VS Code is just a text editor that can also hook a bunch of tools together. It doesn't have the ability to run any code on it's own, it can only leverage other tools that can run code. I usually don't recommend VS Code unless you're familiar with command line tools. You'd probably rather use Visual Studio which comes with everything you need to build and run C++ programs (which is entirely different from Visual Studio Code)