Help with Vectors and Classes

I am terrible with classes long story short. I need to use a vector to hold instances of classes. I have 3 classes used in this, Light, Material, and Sphere. My attempt at a solution was as follows:
vector<Light> LightCnt;
vector<Material> MaterialCnt;
vector<Sphere> SphereCnt;

(They are also supposed to be pointers, and I have no idea where the pointers would go in this.)

This did not work as I was given errors telling me Light, Material, and Sphere were undefined. This is happening inside of a fourth class called Scene. I'm at a loss of what to do and any help would be immensely appreciated.

Oh, also, any help with implementing that vector inside of the Scene.cpp file would help too. so far I have the following which does not work.

Light*;
Material*;
Sphere*;
Last edited on
Can you replicate the problem with the bare minimal requirements to recreate it?

when you get to it, use this: http://www.cplusplus.com/articles/jEywvCM9/
Topic archived. No new replies allowed.