Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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! :)