Well, I managed to make an array of a class inside a method, but when I tried to move it into another class, to make it easier to refer to outside of that method it will compile but not run. Is there a way to store an array of classes inside a class?
Here is my code, the relevant bits:
class Platform{
public:
int id;
float sizeX;
float sizeY;
float sizeZ;
float posX;
float posY;
float posZ;
Platform(int objID, float x, float y, float z, float xP, float yP, float zP);
Platform();
};
Platform::Platform(){
id=0;
sizeX=0;
sizeY=0;
sizeZ=0;
posX=0;
posY=0;
posZ=0;
}
class Matrix
{
public:
void SetUp();
double GetY( double xPos, double zPos);
double GetXAngle( double xPos, double zPos);
double GetZAngle( double xPos, double zPos);
void Dig( int ID, int xPos, int yPos);
Platform thePlatforms[100];
private:
int ID;
int xSize;
int zSize;
int xDivisions;
int zDivisions;
int xPosition;
int yPosition;
int zPosition;
};
"It's better to burn out, than to fade away!" -- The Kurgan