by alexeiz · 5y ago · 0 comments
For example:
void COptions::SetDefaultValues() {
ZeroMemory(this, sizeof(COptions));
is a great way to overwrite a vtbl pointer and end up with a invalid object state. There is a safe and perfectly Standard compliant way to reset the object to its default state: `*this = COptions()`