ok, I think that the problem is that I haven’t initialized the vector
but I dont know… anyway, I am getting an error saying that this is wrong:
drawable.at(i).draw();
with the vector being declared in the header file as:
vector<render*> drawable;
its a vector of render pointers as I have a whole bunch of classes that need to be drawn and they are all children of a parent with pure virtual functions in it, is this the wrong way?
btw, to put a child in I used this:
header:
ShaysWorld * sw;
cpp:
sw = new ShaysWorld;
drawable.push_back(sw);
What can I do to fix the left of ‘.draw’ problem?
drawable.at(i)->draw();because drawable.at(i) is a render pointer