method on deleted instance of class still work?
问题 I have this code on Visual C++ 2010 #include <iostream> #include <string> using namespace std; class Human { private: int magic; int health; string name; public: int GetMagic() const; int GetHealth() const; Human(int, string); ~Human(); }; //helper int Human::GetHealth() const { cout <<"This returns Human::health" << endl; return Human::health; } int Human::GetMagic() const { cout <<"This returns this->magic"<< endl; return this->magic; } //con/destructor Human::Human(int a, int b, string c):