which works and is fine, however in the function, when I try to access members or methods or enemies or effect if(effects[d]->collide(enemies[i]->x, enemies[i]->y enemies[i]->w, enemies[i]->h))
I get the error "base operand of "->" has non-pointer type 'std::vector<enemy*>*'.
I can access the size of both enemies and effects, it's just accessing the methods that is giving problems
repackage data? Eg, say you had a list or tree or something of data and you don't want to mess with its order or structure, but you need to print a sorted list of it. Vector of pointers to all the nodes will solve this with minimal copying and pain, even easier if you maintain it alongside the other structure. Contrived example, I guess? But there are times when its handy to make an array out of something else.