This is probably not the correct interpretation of this error.
The Win32 error above is more likely to indicate the actual problem.
Flags
Severity
Success
This code indicates success, rather than an error.
This may not be the correct interpretation of this code,
or possibly the program is handling errors incorrectly.
Instantiation: weapons.push_back(new Pistol()); weapons.push_back(new Rifle()); weapons.push_back(new Shotgun()); destructor, when the first delete happens, the code breaks. This happens when I close the program. Brain::~Brain() { for (unsigned int i = 0; i < weapons.size(); i++) { delete weapons[i]; // this is where the code breaks } } I get a [...] read more