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

How to automatically convert strongly typed enum into int?

Strongly typed enums aiming to solve multiple problems and not only scoping problem as you mentioned in your question: Provide type safety, thus eliminating implicit conversion to integer by integral promotion. Specify underlying types. Provide strong scoping. Thus, it is impossible to implicitly convert a strongly typed enum to integers, or even its underlying type … Read more

How to Uninstall RVM? [duplicate]

It’s easy; just do the following: or And don’t forget to remove the script calls in the following files: ~/.bashrc ~/.bash_profile ~/.profile And maybe others depending on whatever shell you’re using.

no debugging symbols found when using gdb

Some Linux distributions don’t use the gdb style debugging symbols. (IIRC they prefer dwarf2.) In general, gcc and gdb will be in sync as to what kind of debugging symbols they use, and forcing a particular style will just cause problems; unless you know that you need something else, use just -g.