Start Using C++
- Install Microsoft Visual Studio
- Create a Project with Microsoft
- Writing a Program in Microsoft Visual Studio
- Running a Program in Visual Studio
- Compatibility Issue #1: stdafx.h
- Compatibility Issue #2: Pausing the Screen
- If You're Not Using Microsoft
- Advancing to the Next Print Line
- Storing Data: C++ Variables
- Introduction to Data Types
- A Word about Variable Names and Keywords
- Chapter 1 Summary
I’m going to assume at first that you’re using Microsoft Visual Studio, Community Edition. This includes an excellent C++ compiler—it’s powerful, fast, and has nearly all of the up-to-date features. However, the Microsoft compiler raises some special issues, and one of the purposes of this chapter is to acquaint you with those issues so you can successfully use C++.
If you’re not using this compiler, skip ahead to the section, “If You’re Not Using Microsoft.”
I’ll get into the more abstract aspects of C++ later, but first let’s get that compiler installed.
Install Microsoft Visual Studio
Even if you have an older version of Microsoft Visual Studio, you should consider updating to the current Community Edition, because it has nearly all the up-to-date features presented in this book. If you’re already running Enterprise Edition, congratulations, but make sure it’s up to date.
Here are the steps for installing Microsoft Visual Studio Community Edition:
- Regardless of whether you’re downloading from the Internet (you can use a search engine to look up “Visual Studio download”) or, using the CD accompanying this book’s Barnes & Noble Special Edition, get a copy of the file vc_community on your computer. If you’re downloading, this will be found in your Download folder after using the site.
Double click the file vc_community. This launches the installation program. The following screen appears:
Used with permission from Microsoft.
- Click the Install button in the lower-right corner. Installation should begin right away.
- If you’re downloading from the Internet, be prepared for a long wait! If you’re using the CD, installation will be many, many times faster.
If all goes well, Microsoft Visual Studio, which includes the Microsoft C++ compiler, should be installed on your computer, and you’re ready to start programming. First, however, you need to create a project.