更新时间:2018-11-22 15:59作者:王新老师
{
public:
virtual void Intro()
{
printf("I'm a Parent, ");
Hobby();
}
virtual void Hobby()
{
printf("I like football!");
}
};
class CChild:public CParent
{
public:
virtual void Intro()
{
printf("I'm a Child, ");
Hobby();
}
virtual void Hobby()
{
printf("I like basketball!\n");
}
};
int main(void)
{
CChild *pChild = new CChild();
CParent *pParent = (CParent*)pChild;
pParent->Intro();
return 0;
}
A、I'm a Child,I like football! B、I'm a Child,I like basketball!
C、I'm a Parent,I like football! D、I'm a Parent,I like basketball!
3、在win32平台下,以下哪种方式无法实现进程同步?
A、Critical Section B、Event C、Mutex D、Semaphore
4、按照升序排列的一组数据123456798,下面哪种排序法在空间和时间上最优?