读书人

c++中的interface关键字解决办法

发布时间: 2012-03-13 11:21:11 作者: rapoo

c++中的interface关键字
c++中有没有interface关键字?
最近看DirectX sample:skinned mesh. 头文件中有
typedef interface ID3DXAllocateHierarchy ID3DXAllocateHierarchy;
什么意思,请高手指点.

[解决办法]
C++木interface
java,C#那里有
原理一致简单的看作一个接口类
[解决办法]
typedef interface ID3DXAllocateHierarchy ID3DXAllocateHierarchy;

typedef struct ID3DXAllocateHierarchy ID3DXAllocateHierarchy;

typedef ID3DXAllocateHierarchy ID3DXAllocateHierarchy;

这个东西貌似的确有点奇怪啊。
[解决办法]
定义是这样的
在COM接口中用到
typedef struct interface;
[解决办法]
typedef struct interface;????错了吧
#define struct interface才对呢
[解决办法]
在C++标准中没有定义 interface 这个关键字。

它是 VC 自定义的:
typedef struct interface;
[解决办法]
没有这个关键字,JAVA有

读书人网 >C++

热点推荐