?????????
#include "stdafx.h"
#include <Windows.h>
class Car
{
public:
virtual void Run(){}
private:
int m_speed;
};
struct  SRace
{
Car car;
int dirver;
};
int _tmain(int argc?? _TCHAR* argv[])
{
SRace race;
ZeroMemory(&race??sizeof(race));
// ?????????????????
race.car.Run();
Car *pCar = &race.car;
// __vfptr = 0x00000000??????
pCar->Run();
return 0;
}
[cpp] view plaincopy
#include "stdafx.h"
#include <Windows.h>
class Car
{
public:
virtual void Run(){}
private:
int m_speed;
};
struct  SRace
{
Car car;
int dirver;
};
int _tmain(int argc?? _TCHAR* argv[])
{
SRace race;
ZeroMemory(&race??sizeof(race));
// ?????????????????
race.car.Run();
Car *pCar = &race.car;
// __vfptr = 0x00000000??????
pCar->Run();
return 0;
}
={0}
????={0}?????????????????????????????????????л???????????????????????????з??????????????????????????????????????????