What does `dword ptr` mean?

The dword ptr part is called a size directive. This page explains them, but it wasn’t possible to direct-link to the correct section. Basically, it means “the size of the target operand is 32 bits”, so this will bitwise-AND the 32-bit value at the address computed by taking the contents of the ebp register and … Read more

C++ Array of pointers: delete or delete []?

delete[] monsters; Is incorrect because monsters isn’t a pointer to a dynamically allocated array, it is an array of pointers. As a class member it will be destroyed automatically when the class instance is destroyed. Your other implementation is the correct one as the pointers in the array do point to dynamically allocated Monster objects. … Read more