在C++的学习中我们知道,子类是可以覆盖父类的方法,这里我们探讨一下子类方法调用父类方法时this指针时如何变化的。
#include "windows.h"
#include "windef.h"
#include
#include
using namespace std;
class People {
protected:
int gender;
float stature;
float weight;
public:
void GetInfo() {
printf("%d--%f--%f\n",