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++

While Loop
Loops are used to loop back and execute the same block of code over and over again until a certain condition is met. Heres an example using the while loop:

#include <iostream>

using namespace std;

int main(){

	int a;
	
	cout << "How many times do you want the loop to run? ";
	cin >> a;

	while (a){
		cout << a << "\n";
		--a;
	}

	return 0;

}
This code takes a value from the user and runs a while loop that many times. The conditions used for the while loop are the same as the if-then-else statements, same goes for every loop. Here since I only put "a" the program will read "While a is true execute this block" and as long as a is a positive integer it is considered to be 'true'.
For Loop
The for loop works a little bit differently. Instead of taking just one parameter, it takes three. The first is the variable you want to use, you can either use an existing one, or declare one within the for loop. The second parameter is the condition, and the third is used to change the value of the variable chosen in the first parameter. Lets look at the code from the Arrays lesson:

#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");

}

Here the first for loop defines i as an integer with a value of 0. Since the array is 10x10 and 0 counts when counting the elements of an array, we will run the loop until i is equal or greater than 9. "++i" means "add 1 to i", it can be used with any numeric data type. Since the array is two dimensional we will need a second for loop to get the second index number. This is setup the exact same way, except I used a t instead of an i. So now every time the first for loop runs, the second will run 10 times, and then return to the first until the first has been run 10 times thus covering every element in the array.
Google