Create C++ Console Project


Click here to change the theme.

This is a simple description for beginners of how to create a console application in Visual Studio 2017.

Have a look at:

  1. Walkthrough: Creating Windows Desktop Applications (C++)
  2. Desktop Applications (Visual C++) | Microsoft Docs

However I think the second one, the "Microsoft Docs" article has not been revised for Visual Studio 2017 so it might be a little confusing.

I suggest generationg a project that has a complete sample program and for some reason those Microsoft pages don't say how to do it. Try the following.

  1. On the File menu, click New and then click Project.

  2. In the New Project dialog box, in the left pane, click Installed, click Visual C++, and then select Windows Desktop. In the middle pane, select Windows Desktop Wizard.

    In the Name box, type a name for the project or keep the default. Click OK.

  3. In the Windows DesktopProject window change the Application type to Windows Appliation (.exe) and keep all the otehr defaults. Click Ok.

  4. Build the project by clicking the Build menu then the Build Solution menu item. Then execute it using Ctrl-F5.

That describes how to create the project. You can modify the generated sample code.