I'm still very new to C++ so apologies in advance if I am not too clear in my description of my problem.
I am making a text based drug dealing game which has an Class called Enemy which contains all the information you might expect to find about an enemy (health and weapon stats). This is defined in a .h and .cpp file within my project. I am then making a class called Location which contains information on how many customers want drugs of each type, the maximum number of customers for each drug type and so on. At each location I want to have an array of enemies so that the player must fight off a group of enemies before they can start to deal on that turf.
So I have my Enemy class working properly and then within the Location class I want to add something like this:
So I have an array of five enemies which I can then tweak each turn based on some simple randomisation so the gang is not always identical.
When I compile this within Code::Blocks I get the following error.
`Enemy' does not name a type
I have written #include "Enemy.h" at the top of the Location.h file so it should know what an Enemy class is. What am I doing wrong?