Home > Articles > Programming > C/C++

  • Print
  • + Share This
This chapter is from the book

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.

  • + Share This
  • 🔖 Save To Your Account