I'm newbie to C++. I'm trying to create a game using it. Basically, my game has multiple levels, each having a different number of monsters. I have a class represeting the monster. My question is, how do I initialize them all? Should I use a pointer, then dynamically alloc the number of monsters I need, then delete them and initialize them again for the next level?
Tell me more
×
Stack Overflow is a question and answer site for
professional and enthusiast programmers. It's 100% free, no registration required.
add comment (requires an account with 50 reputation) |
put on hold as too broad by Borgleader, Mark Garcia, Mysticial, Rapptz, GManNickG Jul 23 at 3:07
There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.
std::vector
or something. – chris Jul 23 at 2:48