Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Why is it so hard to get C++ to work on Visual Studio Code??

I know unfortunately C++ is not taught here at Treehouse, so I'm just gonna mark this as General Discussion, but does anyone at all have any idea how to get C++ to work on Visual Studio Code?? I have watched 10 different videos on how to do this (not an exaggeration), and none of them have worked for me. If Visual Studio wants people to use their software, then why make it extremely difficult for people to figure out how to compile C++?? All of the videos I watched were an earlier version of the software, so I was left floating in the wind. Everything I have tried has failed miserably, and I even have a C++ compiler, but every time I run it I get an exit code of 1, meaning it did not even compile the code. I have no idea what I could be doing wrong, I am extremely frustrated from working on this for 6 hours, and I am really really really really reaaaaaally desperate for help, so if anyone knows anything please let me know and please feel free to ask any other questions you have.

jacobb2
jacobb2
14,128 Points

I wouldn't use Visual Studio Code for C++

Try Visual Studio Express (free edition) https://visualstudio.microsoft.com/vs/express/

2 Answers

Sadly I don't have an answer but this scares me considering i'll be learning C++ this upcoming semester in school :(

Thanks Kevin, I appreciate your response. C++ itself isn't very hard, but it's just trying to get it to work with VSC that I'm having trouble with.

katelynwatford
katelynwatford
4,773 Points

Hi I am taking c++ right now in school and we use visual studio code. Here is a link that the teacher posted to install gcc so that you can compile your programs using the terminal.

"https://www.youtube.com/watch?v=0z-fCNNqfEg&t=251s"

Hope this helps! :)