C++ Game Programming
Basic C++ Lessons
This set of lessons will give you a simple introduction to programming in the C++ language.
Allegro Lessons
This set of lessons will demonstrate how to use the Allegro graphics library to create video games.
Game Source Code
Here you will find source code to several games so that you can see the code in action.
Recommended Books
Here is a list of books which should help you with C++

Arrays
In the last lesson we saw how to create simple variables and store user input in them. Now we will look into arrays. An array is simply a list of variables of the same type. Lets say your program required you to keep track of 100 integers, in which case you would have to create 100 integers by typing up each one, one by one... Needless to say that would take quite a while, but with arrays you can cut the typing down to one single line! Lets see how it works:

#include <iostream>

using namespace std;

int main(){

	int myArray[3];

	cout << "Enter a number: ";
	cin >> myArray[0];

	cout << "Enter a second number: ";
	cin >> myArray[1];

	myArray[2] = myArray[0]+myArray[1];

	cout << "The sum is: " << myArray[2];

	system("pause");

}

Here we have the same sample program from the previous lesson, except I replaced the three integers with a single array made up of three integers. "int myArray[3];" creates an array of three integers. Each integer inside this array will have a corresponding number, starting at 0. So in this case the three integers are myArray[0], myArray[1], and myArray[2]. Since 0 counts, there is not myArray[3]! Everything else is exactly the same.

You can also use arrays to store a string of text by creating an array of characters. Here you would make the array the max size of characters you want plus one, since strings must end the null character (null mean nothing, not 0, just nothing). We will look more into strings in a latter lesson though.

Two Dimensional Arrays
2D arrays work just like normal arrays except they have two numbers per variable. In order to declare one you would add an extra pair of brackets (int my2dArray[3][3]). Here is a graphical representation of a 2D array:

XXX
XXX
XXX

These will come in handy when you are programming graphics and animations, lets see an example program:

#include <iostream>

using namespace std;

int main(){

	int myArray[10][10];
	for (int i = 0; i <= 9; ++i){

		for (int t = 0; t <=9; ++t){

			myArray[i][t] = i+t; //This will give each element a value

		}

	}
	
	for (int i = 0; i <= 9; ++i){

		for (int t = 0; t <=9; ++t){

			cout << myArray[i][t];

		}

	}

	system("pause");

}

Ignore the for loops for now, we will look into those in the loops lesson. This program simply assigns a value to each element in myArray and then displays each one. As you can see there is not much difference between using normal arrays and 2d arrays.
Google