1.Introduction to Visual Studio and C++
The purpose of this tutorial is to introduce the basics of working in the Microsoft Visual Studio software development environment. Microsoft Visual Studio (VS) consists of a collection of tools that allow a programmer to edit, compile, debug, test and deploy applications on a variety of operating systems such as Microsoft Windows and Windows Mobile devices. Such tools are often called an Integrated Development Environment (IDE). Other popular IDEs include Eclipse (www.eclipse.org) and Xcode (developer.apple.com/xcode).
Microsoft offers a number of different versions and levels of VS products that vary in their features. For a comparison, please visit the Microsoft VS web site: http://www.microsoft.com/visualstudio/en-us
Visual Studio provides tools for writing and compiling programs written in Visual Basic, C++, C#, and F#. This tutorial will focus on using VS for C++ development.
There are a number of ways to develop C++ programs including:
- Windows 32 bit Console application (Win32 Console).
- Windows Application using Microsoft Foundation Classes (MFC).
- Windows Application using Windows Forms tools.
- Windows Application using Windows Presentation Framework (WPF).
This tutorial focuses on writing Win32 Console applications using the C++ language using the 2010 version of Visual Studio Ultimate.
2. Obtaining Microsoft Visual Studio
Many colleges and universities subscribe to the Microsoft Developers Network Academic Alliance (MSDN AA) also known as “DreamSpark” that provides free or reduced cost copies of Microsoft development tools for student use. For example, at Baruch College: http://www.baruch.cuny.edu/bctc/student/index.htm). The IEEE Computer Society also provides access to MSDN AA for student members (http://www.computer.org/portal/web/membership/benefit-microsoftsoftware).
Microsoft also provides free “Express” editions of specific IDE’s and compilers for individual languages. For example, the Visual C++ 2010 Express edition can be downloaded for free and can be used to carry out the activities in this tutorial. It is also suitable for most programming courses. The current web site for Visual C++ Express is: http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express
One other issue that may face some students is the fact that Visual Studio only runs under the Windows operating system (such as Windows XP, Vista or Windows 7). If you have a MacBook, iMac or other Apple system running MacOS that uses an Intel CPU, there are a few possible alternatives you can try. Many modern Apple computers that use Intel CPU can run the Windows operating system. Note that you will need a legally licensed copy of Windows operating system to do this. There are two main ways to accomplish this:
- You can set up your Mac to “Dual Boot” both OS X and Windows. One product that can enable this is Apple BootCamp software.
- You can run Windows OS “side by side” with Mac OS X using a “virtual” computer such as VirtualBox
In the next section we will introduce Visual Studio Solutions and Projects.