'Should I use stack or heap memory for classes in a game? C++

So I’m writing a console game in c++. I have enemy classes, will have a player class soon, im gonna have projectile classes (hopefully I can figure out some way to help performance all of these objects) and I was wondering whether the heap or the stack would be better to allocate memory to. I know the stack is faster, but if I initialize a class in main() would it ever be destroyed?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source