ISO C++ Project Template for Visual Studio 2015

Home Code CPTR 124


The ISO C++ project template file for Visual Studio 2015 that I use in class can be downloaded here: ISO-C++vs2015.zip.

Place the downloaded ISO-C++.zip file in the following folder (replace "rick" in the following path with your user name):

C:\Users\rick\Documents\Visual Studio 2015\Templates\ProjectTemplates

The next time you start Visual Studio and attempt to create a new C++ project you should have an option in the C++ projects dialog to create an ISO C++ console application. Give the project a relatively simple name because the template automatically will create a .cpp source file with the same name.

This custom project template does two things for you:

  1. It automatically generates a skeletal C++ file that contains the code common to all our C++ programs. You then need only fill in the details that are specific to the current program. This allows you to create a simple C++ program quickly without going through the error-prone steps of adding a Win32 Console application, remembering to make sure the project in empty, adding a new item (C++ source file), and typing in #include<iostream>, etc.
  2. It adjusts the compiler's warning level to 4. The Visual Studio IDE uses warning level 3 by default. The enhanced warning level allows the compiler to generate additional diagnostics about common programming mistakes. This is a good thing.

Even though this template automatically creates the source file containing the main function, you may add extra C++ source files to the project as needed through Visual Studio's normal Add item menu.