CSCI 261 Programming Concepts (C++)

Winter/Spring 2012

Setting Up Your Development Environment

Note: We only guarantee the availability of Visual Studio and the ability to use the CSCI261 toolkit in official lab locations and CTLM B56. However, the CTLM Commons and machines in Brown seem to be a-ok as of this writing (1/9/2012).

Before you begin working on any programming project, you must set up some kind of "workspace" on your computer. Software engineers call this "setting up your development environment" or "setting up your dev-env." For this class, you need only two things: an IDE and the CSCI261 Toolkit. But first, let's adjust your Windows configuration.

Adjust Your Windows Configuration

There are many things that the Windows interface tries to hide from mere mortals. Since you're a Mines student, not just a mere mortal, you should take off some of these training wheels that Windows provides. Specifically, unhiding file extensions. To do this, you can read the official support doc and/or follow the steps shown in this video:

Install Your IDE (Integrated Development Environment)

The IDE is the main piece of software within which you type your programs. Why such a complicated name? That's a long story. In fact, many programmers eschew IDEs in lieu of powerful text editors. Regardless, for this class our IDE is Microsoft Visual Studio for C++. It is already installed on all lab machines, and there is no need for you to download and install it.

However, if you'd like to set up your own personal computer to work on 261 projects (especially on Friday and Saturday nights) then you will need to download and install the software. The process is straightforward. When installing, choose all the defaults. Many programmers call this a "next-next-next" installation. How cute.

Have a Mac or a Linux box? You'll first need to install virtualization software such as VMWare Fusion or VirtualBox. Second, you'll need to install Windows as a virtual machine: see the CTLM help desk for a free license (tell them you're a CSCI261 student). Lastly, install Microsoft Visual Studio C++ 2010 Express.

Configure Your IDE

By default, Visual Studio does not display line numbers next to your code listing. This is so important to programmers, that Microsoft figured they would play a joke on us. (Very funny Microsoft!) To turn on line numbers, notice the main menubar of the IDE (the thing with "File Edit View..." and so on toward the top of the screen). Click "Tools" then "Options..." then "Text Editor" then "All Languages." Now make sure the checkbox labeled "Line numbers" is checked. It should look like this when you are done.

Lastly, click "OK" and forgive Microsoft for the bad joke.

Download and Extract the CSCI261 Toolkit

Once your computer has a working installation of MS Visual Studio, install the toolkit for this class. You should be loaned a CSCI261 Toolkit CD during the first lab, or you can download it here:

Right-click me and select "Save target as..." and select your Z:\ drive.

Once you have downloaded the zip file, you will need to extract its contents. The Windows interface hides a lot of what's really going on here, but lets get down to specifics. You should:

Here is a video demonstrating these steps:

Test Your Setup

To make sure you've followed the instructions above correctly, you should open and run an example program. Navigate to csci261_toolkit/apps/examples/graphicsExample. Right-click on graphicsExample.sln and click "Open With... Visual Studio 2010." Click the green "play" button or press CTRL-F5. If your toolkit and development environment are correct, you should see a running graphical program on the screen.

That's it. Happy hacking!