What is the point of dynamic allocation in C++?
- by Aerovistae
I really have never understood it at all. I can do it, but I just don't get why I would want to.
For instance, I was programming a game yesterday, and I set up an array of pointers to dynamically allocated little enemies in the game, then passed it to a function which updates their positions.
When I ran the game, I got one of those nondescript…