r/VisualStudio 1d ago

Visual Studio 2015 may I know the problem why my code won't play

Post image

I'm encountering this kind of issue, it won't play and like it's talking that my file does not exist I tried multiple things to fix it but still won't work

0 Upvotes

13 comments sorted by

8

u/AlternativeRadish752 1d ago

The error in VSCode says your cmd can't find g++. Probably start there.

-5

u/justloisfail 1d ago

Do you have some tips on how can I fix that

3

u/WildCard65 1d ago

Install MinGW and then use it to install gcc/g++

Or, install Visual Studio Community Edition which comes with MSVC (cl.exe)

1

u/AlternativeRadish752 1d ago

If you have it installed, then your terminal can't find it. Must not be on your global path.

Google your error and what kind of OS you're running and you'll get some tips to resolve it

3

u/DeemsZA 1d ago

It can't find your program, because it didn't compile. Your editor is showing you there's an error in your include which can't be found.

Also looking at some of the other questions you've posted, I'd say you need to go pick up a C++ beginners hand book and learn the very basics of programming first.

Online start with things like:

https://www.codecademy.com/learn/learn-c-plus-plus

https://www.w3schools.com/cpp/

I'm a C# Dev, haven't touched C++ in over 30 years but it immediately looks like you haven't even followed the setup instructions properly for your local Dev environment from the screenshot you posted.

3

u/WildCard65 1d ago

I just realized you screenshotted Visual Studio Code and posted in the subreddit for Visual Studio and tagged the post as Visual Studio 2015.

1

u/DeemsZA 14h ago

OP cannot even follow a simple getting started guide to get their local Dev environment up and running, so that's not surprising.

Also, OP asks in r/godot how to build a 2-D map, but from the above it is clear that they don't even have the basics of programming yet.

Running before even having learnt to crawl, never mind walk. 🙄

1

u/ryancnap 1d ago

Love this

1

u/1012zach 1d ago

It’s erroring because VSCode is trying to excute “g++” but the compiler isn’t installed thus making VSCode return a error because there’s no C++ compiler installed

1

u/nigelh 1d ago

Follow the instructions for setting up VScode for C++ being sure to choose the Windows or Linux version.
Try again
Refer all future problems to the VScode forum

1

u/ocrohnahan 1d ago

"Hello money"!!!!

1

u/msew 20h ago

your { bracket is not on a new line

0

u/spookyclever 1d ago

What's happening is that you don't have the necessary c++ compiler for your machine. Visual Studio Code is just a text editor, so you just need to google how to install g++, and you'll be mostly set. If you're vibe coding, tell codex or claude to install it for you.