When you click New Project under the file menu, you should get a window that looks much like the image below.

For this project we are going to do a "Console Application" which means that our program will run in what appears to be an old DOS Command Line. Insert a name into the line that says name, unless you've changed "Solution Name" it will change to show the same name. This can be any name you might name a file.
simply click next to get to the next window, there are no settings to change here.

You should now have a window that looks like the image below. You will notice that Console application is once again selected here.

Now click the Check box for empty project like in the image above. We will be writing our project from scratch. Other settings will include headers and files that would be useful only in more complicated projects.
Now our project is created, but we have no files for code.

We won't need Header or Resource Files for this project, However we need at least our one main source file, or we'll have no code and no program. Right click the Source Files folder in your Solution Explorer and select Add ->New Item...
You will get a window like this.

Under Name pick a name for our main file, and make sure "C++ File" is the type selected.
Every C++ project must have a function called "main" Functions are a concept that's a bit advanced for this tutorial, so for now all you need to know is that a function consists of 4 parts.
Typing this into your created file, your main function should look a little like this:
int main()
{
return 0;//this is a comment.
}
in the code above, "int" (short for integer) refers to the return type, This is how I've always been taught to write main functions, it is considered a C++ standard that main returns an integer value to mark the success of the program. 0 represents that it ran successfully. The parenthesis, represent our parameter list, since we need no parameters, it is empty. Everything between the curly brackets represent the body of our code so far. The line "return 0;" is required to compile because this is the line where our code returns the integer that we promissed. The double "/" marks the start of a comment, anything typed in a comment is for your benefit only and will not effect the outcome of the program.
Next we will Include our header. We need to tell the pre-compiler that we will be using input and output to get data from the user and print data to the screen in this project. As the first line, before any of our other code we will include iostream (input output stream) and change our namespace for simpler typing for the rest of our code. Any comands that are part of the "std" namespace needs to have "std::" included in front of it if you do not change your name space, this includes all the commands from iostream, since we'll be using those commands it is easier to just specify the namespace in the header.
#include
<iostream>
using namespace std;
*/this marks the start of a long potentially multiple line comment, and just like // none of this will effect our code. The reason we use namespace std, is because it will save us typing when we use commands from that name space. otherwise we'd have to type std:: before each one for the compiler to know which command we wanted to use. A long comment ends like so /*
int main()
{
return 0;//this is a comment.
}
Now we are ready to do the ever so popular "Hello World" in c++ we simply need to add a line of output to our code. note every line with the exceptions of loops or if statements within the code must end with a ;
#include
<iostream>
using namespace std;
*/this marks the start of a long potentially multiple line comment, and just like // none of this will effect our code. The reason we use namespace std, is because it will save us typing when we use commands from that name space. otherwise we'd have to type std:: before each one for the compiler to know which command we wanted to use. A long comment ends like so /*
int main()
{
cout << "Hello World";
return 0;//this is a comment.
}
If you build your code now, it should compile, select "start without debugging" and you should get the following result.

now it's time for a slightly more complicated project.
This second phase will include our first use of variables, which are the only means we have for manipulating or processing any data. Before we can use a variable in C++ we need to declare it. This means telling the computer what type of Variable it is going to be, and it's name. We are allowed to but not required to also assign it a value when we create it. Lets add this to our code.
#include
<iostream>
using namespace std;
*/this marks the start of a long potentially multiple line comment, and just like // none of this will effect our code. The reason we use namespace std, is because it will save us typing when we use commands from that name space. otherwise we'd have to type std:: before each one for the compiler to know which command we wanted to use. A long comment ends like so /*
int main()
{
int counter=5;// the type is int for integer, and we've assigned it a value of 5
cout << "Hello World";
return 0;//this is a comment.
}
Next we will create a loop. There are a few types of loop, all of them are used for lines of code we need to repeat in succession, for our purposes in this project we are going to use what is called a "for-loop" which works on a counter. a for loop has a few parts and may in some ways resemble a function.
Be very careful, if you make a mistake in the any of the first 3 parts you may create a loop that runs until your computer crashes or you kill the program, equally common is a loop that never runs. (Notice in the example below if we had put "i--" to subtract each time instead of add, that unless our counter was negative, the loop would never reach a state where i > counter) This is not an uncommon mistake. Now lets add a loop to our code.
#include
<iostream>
using namespace std;
*/this marks the start of a long potentially multiple line comment, and just like // none of this will effect our code. The reason we use namespace std, is because it will save us typing when we use commands from that name space. otherwise we'd have to type std:: before each one for the compiler to know which command we wanted to use. A long comment ends like so /*
int main()
{
int counter=5;// the type is int, and we've assigned it a value of 5
for(int i=0;i<counter;i++)//i++ is shorthand for i=i+1
{
cout << "Hello World";<< endl;//endl, is short for end line.
}
return 0;//this is a comment.
}
Now it is time to get some user input and make our program do something with it. We can get input with cin, keep in mind that if the user enters anything that doesn't match our data type, the program will crash. However this is a learning experience and not a "coddle the user" experience, so we'll ignore that this time. Lets update our code. First we need to output a polite request to the user, followed by instructions to the computer to retrieve the input.
#include
<iostream>
using namespace std;
/*this marks the start of a long potentially multiple line comment, and just like // none of this will effect our code. The reason we use namespace std, is because it will save us typing when we use commands from that name space. otherwise we'd have to type std:: before each one for the compiler to know which command we wanted to use. A long comment ends like so */
int main()
{
int counter; // we no longer need counter to have a preset value.
cout<<"Give me an integer or else!";
cin>>counter;
for(int i=0;i<counter;i++)//i++ is shorthand for i=i+1
{
cout << "Hello World" << endl;//endl, is short for end line.
}
return 0;//this is a comment.
}
When you compile and run as we did above, you should get something like this.

Congratulations! You're an amatuer programmer now!