Prerequisites 1

Setting up Visual Studio for a console project

Win32Developer.com contains a mixture of console and Windows based tutorials. In order to guarantee that these tutorials compile and run first time, every time, please follow these simple steps in order to set up Visual Studio.

At the start of every tutorial you will notice a 'Prerequisites' section, which advises what type of project you should be using.

Be sure that you have set up Visual Studio for the correct project type for the tutorial, to ensure that you do not recieve compile and linker errors.

An example of what the 'Prerequisites' section looks like is as follows.

Prerequisites

Project type: Console
Include files: winsock2.h, iostream.h
Library files: ws2_32.lib



Configuring the 'Console' project

Start Visual Studio.net.

Select 'File', then 'New Project'

Creating a console project

Choose 'Win32 Console Application' and choose a name for the project. Then select OK.

You will see the following screen.

Creating a console project

Select 'next'

Creating a console project

Select 'Empty project' and click 'Finish'

Creating a console project

Right click on 'Source files' and select 'Add -> New Item'

Creating a console project

Choose 'C++ File' and enter 'main.cpp' into the name field.

Now Visual Studio is set up and ready to go for the 'console' type of tutorials.

Next tutorial

Prerequisites 2 - Setting up Visual Studio for a Windows project