Quote:Original post by Palidine
or you could use an STL container:
*** Source Snippet Removed ***
std::vector has a constructor for the case where each initial element is the same; there's no need to invoke the subtler stuff from <algorithm>. We don't even need to store things by pointer:
std::vector<Character> Heroes(10, Character(graphics, collision, 100, 100));
In general, adding pointers to your design because "it's hard to do it without pointers" is the wrong design decision: it will make lots of other things harder (at least if you care about doing them properly), and you'll be worse off.