通过函数指针调用C+类方法
class Dog : Animal{
Dog ();
void bark ();}…Dog* pDog = new Dog ();BarkFunction pBark = &Dog::bark;(*pBark) (pDog);…NewAnimalFunction pNew = &Dog::Dog;Animal* pAnimal = (*pNew)();
富国沪深
一只名叫tom的猫
翻过高山走不出你
12345678_0001
随时随地看视频慕课网APP
相关分类