在VC里嵌入Excel,有个Xoffice的例子,其中对Word,Excel,BVA运行库进行了封装,采用了智能指针,但是我的声明:
(Excel是命名空间)Excel::_Application ExcelApp;
ExcelApp.Run(...);编译出现了如下错误:
error C2259: '_Application' : cannot instantiate abstract class due to following members:excel9.tlh(4960) : see declaration of '_Application'652个类似的警告:
warning C4259: 'long __stdcall IUnknown::QueryInterface(const struct _GUID &,void ** )' : pure virtual function was not defined unknwn.h(109) : see declaration of 'QueryInterface'
为什么??????????????????????
如果Excel::_WorkbookPtr book;声明就没有错误。
为什么不能声明_Application?????????????????????????????