摘要: 在InitInstance里面添加:HRESULT CoInitializeEx( void * pvReserved, //must be null currently DWORD dwCoInit //see the following definition to COINIT);typedef enum tagCOINIT { COINIT_MULTITHREADED = 0x0, COINIT_APARTMENTTHREADED = 0x2, COINIT_DISABLE_OLE1DDE = 0x4, COIN... 阅读全文
posted @ 2012-03-16 08:59 kcy-666 阅读(230) 评论(0) 推荐(0) 编辑
摘要: 有如下继承关系的几个类:以下是类的相关代码://抽象基类:动物类class CAnimal{public: virtual void EatFood(string strSomething) = 0; virtual void Drink(string strSomething) = 0;};//CAnimal的派生类:CMammalclass CMammal : public CAnimal{public: virtual void EatFood(string strSomething) { cout << "CMammal::EatFood()" ... 阅读全文
posted @ 2012-03-15 12:47 kcy-666 阅读(2878) 评论(0) 推荐(1) 编辑