Originally Posted by
LAURENT*
I just noticed the real problem. It was a problem with a function argument. Apparently I wrote something like this.
Code:
Void function (Class *square)
{
//Stuff goes here
}
Instead of
Code:
Void function (Class *square[])
{
//Stuff, whatever...
}
Anyways thanks for clearing up what's possible.
You might look into doing it like:
Code:
void func (const std::vector<Class*>& squares) {}
Or even:
Code:
void func (const std::vector<std::shared_ptr<Class>>& squares) {}
// You could do a typedef to make declaring it shorter
Just a thought anyway. I'm currently rewriting a game engine myself, and I'm using the shared_ptr and container classes quite a lot, they are really convenient. Although I want to write some specialized array like containers myself for a "Graph" class (like
Code:
Graph<SDL_Texture*>
or
Code:
Graph<std::shared_ptr<Vertice>>
, or whatever, just to have member functions that can operate/query many things at once).