I now understand basic Classes, however, I still have a problem I need help with. I am mostly interested in game programming to give you an idea of where I am headed. Please read the scenario below and direct me towards what I need to learn now.
Here is the scenario : A player walks into a room in the game. And I have a chance to spawn Class Enemy. What do I need to read up on now to learn how to manage X amount of Class Enemy when I do not know in advance how many I will be spawning? For example if I know I only need 1 of them I can name it One_Enemy, but what if I want a random number to determine how many show up in that room? How do I name each one of them? I have not been able to figure out what it is I need to read up on or learn to accomplish this. That is all I'm asking help for unless you have an example you can show me. Thanks in advance.
That is also helpful but perhaps I am not explaining it correctly what I want.
As far as I've learned when I declare a class I have a name for it. Such as "Class George"
But what if I do not know how many of that class I want to spawn in advance. They obviously can't all be named George, I have to some way have the computer generate names for them.
The containers actualy do what you want.
The are called containers because they 'contain' other classes.
So vector<int> myIntVector
is a vector of integers, vector<George> myGeorgeVector
is a vector of George.
I would probably advise looking at arrays first, such as int myArray[10]
This will help you understand the concept of a variable with a number of elements, and there are pleanty of tutorials which include details on arrays (EG http://www.cplusplus.com/doc/tutorial/)
Once you are happy you understand using them (if you are not familiar with them already) you can go on to look at the container classes which can be regarded as 'clever arrays'.