The Art of C ++ Programming, Chapter 2 – Installing Microsoft Visual Studio

Development Environment:

First thing's first. Lets get us an environment to work in. I personally recommend the Microsoft Visual Studio C ++ Express edition, but there are other compilers out there like Dev Studio, etc.

This is the compiler many professionals use (they pay for an upgraded version, but it's the same basic thing), so it's a pretty sweet deal.

While you are downloading and installing that bit of software, I'll go ahead and explain in a nutshell exactly what you are downloading. A "development environment" (what we are downloading) is a combination of several tools a programmer can use to create things.

The parts we care about are: Text Editor: where the code is written. Think of notepad Compiler: the thing that turns your code into machine code (computer language) Debugger: the tool used for pointing out wrong code (finds your errors … sort of)

Without these, you can not really develop much. You could always program something in notepad and plug it into a compiler, but you will not have a debugger. Meaning if something goes wrong, you will not know what caused the problem.

Thankfully, what we are downloading here is arguably one of the best development environments available (its Microsoft …). It contains everything we need! Your download should be done, so begin the install.

Once you got it installed, go ahead and open it up!

Creating a New Project: Seems like time to introduce that ever-so-popular "Hello World!" program .. lets get started!

Logically, you would just hit new file and be set. With Visual Studio, it takes a few more steps, but its easy if you have some guidance. If you are using a compiler other than Visual Studio, I am afraid you are on your own for this step.

To make a new project, go to File -> New -> Project.

From there, go to Visual C ++ -> Win32 -> Win32 Console Application. After selecting the console application option, enter in a name for your project. For this example, lets just call it HelloWorld. Its good to name our projects something relevant to what the program will do; In this case, our program will print "Hello World!" to the screen. Exciting? Do not worry, it gets better; ).

For the next step, hit "next". You should now see a screen that looks like this. Be sure and "check" the circles next to Console Application and Empty Project. After that, hit Finish.

Leave a Reply