Help with programming: Visual Studio/ Text Wrangler and XCode

Hello,

I started learning to code last year, and sped through Zed Shaws learning python the hard way quick enough to want to progress. I was using text wrangler and a terminal to do this, I enjoyed using it.

I reviewed my learning and decided to go try C++ instead, as my reasons to learn to code changed. I started using beginning C++ for games design, and the book recommends to use Microsoft Visual Studio. It is horrible, because, even writing the simplest of code, I am getting more errors the more fixes I try. I really want to learn to code, but is there an alternative to visual studio? Any suggestions would be welcomed.

Your could try your original approach of using a code editor and command line. Visual Studio might be excessively helpful for a beginner - at least for “hello world!” level of programs.

Some free code editors would include Atom, Visual Studio Code [not the same as Visual studio!], TextMate. You may need to confirm if any particular one supports C++.  You’ll also need to have a C++ compiler you can use on the command line - Visual Studio is providing one for you.

Do keep in mind that C++ is far less forgiving than Python. As a result, Visual Studio is going to be very picky!

But if you’re planning to follow along with the projects in “beginning C++ for games”, you’re probably going to have to use an IDE like Visual Studio, just to make things easier. These projects are going to involve many, many source files as well as external libraries; getting those to compile and link via the command line will become complex.

Looking at your screen cap, most of your errors are caused by the fact you told Visual Studio to start a C# (C-sharp) project, not a C++ project. Visual Studio is trying to interpret your C++ code as C# code, so the errors are not helpful. If you closed this project and started a new, blank C++ project, I think you’d make a lot more progress.

[In your screen cap, the file says ‘appdelegate.cs’ which is a C# file. You also can’t add C++ code to an existing file - the “#include” statements must be the first code lines in a C++ file.]

Please follow-up to let us know how you made out. For good karma, mark a reply as the answer if it helped!

1 Like