- 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
Running a Program in Visual Studio
Now you need to translate and run the program. In Visual Studio, all you do is press Ctrl+F5 or else choose the Start Without Debugging command from the Debug menu.
Visual Studio will say that the program is out of date and ask if you want to rebuild it. Say yes by clicking the Yes button.
If you received error messages, you probably have mistyped something. One of the intimidating aspects of C++, until you get used to it, is that even a single mistyped character can result in a series of “cascading errors.” So, don’t get upset, just check your spelling. In particular, check the following:
- The two C++ statements (and most lines of code you type in will be C++ statements), end with a semicolon (;), so be careful not to forget those semis.
- But make sure the #include directives do not end with semicolons(;).
- Case sensitivity absolutely matters in C++ (although spacing, for the most part, does not). Make sure you did not type any capital letters except for text enclosed in quotation marks.
After you’re sure you’ve typed everything correctly, you can rebuild the program by pressing Ctrl+F5 again.