最近做一个KTV点歌系统, 编译时发现两个错误,网上找了好久,无意中看到解决方法,编译通过了.
c:/program files/microsoft visual studio/vc98/include/comip.h(690) : error C2227: left of '->QueryInterface' must point to class/struct/union
c:/program files/microsoft visual studio/vc98/include/comip.h(195) : see reference to function template instantiation 'long __thiscall _com_ptr_t<class _com_IIID<struct _Connection,&struct __s_GUID _GUID_00000550_0000_0010_8000_00aa006d2ea4
> >::_QueryInterface(long *const & )' being compiled
修改程序中的bool 类型为BOOL,因为我程序中函数返回值是BOOL,而代码中是return true/false;应该改为 return TRUE/FALSE.
所有函数的返回值都对应后就OK了.