Don't ask me why (I'm a C programmer, not a C++ programmer) but get rid of the new keyword.
Your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advise on) your project See About the Installation & Troubleshooting category.
creates a new monster object on the heap, and sets the pointer m to point to it. If you do this within loop(), you MUST delete it before exiting loop, or the heap memory occupied by the object will be lost, and you WILL run out of memory very quickly.
monster m;
creates a new monster object named m on the stack. If this is done within any function, the object will be discarded when the function exits, unless the object is declared static.
before the definitions of any member data or functions you want to be public.
Place
private:
before the definitions of any member data or functions you want to be private.
For a class, all are private by default. For a struct, all are public by default. Using the modifiers above, you can force any or all members in classes or structs to whatever access you want.