Compile and Run in Visual Studio Code

I’m trying to use Visual Studio Code to follow along. But It doesn’t let me compile or run the code, I put in the “g++ triplex.cpp etc.” And it doesn’t look the same on my screen as it does on the course screen.

PLEASE HELP Below I attached my version and the tutorials version (the one with the play button )

You probably need to provide a bit more information about what the actual error is that you’re seeing. Also, it won’t look exactly the same - the screenshot is from a mac (I believe) and the video is done on Windows. The command lines will, of course, be different.

Hey thanks for responding. I’m very new. There’s no error.

On the windows pic it has “e:\tripleX>”, which is where he will then write his code to compile etc. where as my Mac doesn’t. And I don’t have anywhere to write the “g++ triplex.cpp -o triplex” part. (As shown)

I am more familiar with Xcode if that is something I can use instead I will. But It will be difficult to follow along when they’re using VS code.

When I try to enter the g++… etc and press ENTER to run it, it just makes a new line with the same thing. Very confusing.

I thought it may have been that his window says “2.cmd” and mine says “Tcsh” But again, I’m very new.

That’s expected. GCC doesn’t output anything on a succesful compilation.

On the video it doesn’t show how to properly run the file, the guy just clicks something and it does it.
When I click Terminal -> Run Task

It shows me this

How do you run it? Is it the RUN drop down or the TERMINAL drop down?

Privacy & Terms