这是我的代码
#include "stdafx.h"**
class IPlayback
{
public:
virtual void createRenderStream() = 0;
};
class ICapture
{
public:
virtual void createCaptureStream() = 0;
};
class IAudioStackInterface
{
public:
virtual void createStream() = 0;
};
class CAudioClientInterface : public IAudioStackInterface,
public ICapture,
public IPlayback
{
void createCaptureStream()
{
printf("\n i am in createCaptureStream");
}
void createRenderStream()
{
printf("\n i am in createRenderStream");
}
void createStream()
{
printf("\n i am in createStream");
}
};
typedef IAudioStackInterface* PIAudioStackInterface;
typedef ICapture* PCapture;
typedef IPlayback* PIPlayback;
typedef void* PVOID;
int main()
{
PVOID pObj = new CAudioClientInterface();
PIPlayback pPlayBackInterfcace = (PIPlayback) pObj;
pPlayBackInterfcace->createRenderStream();
return 0;
}
我应该打印 createRenderstream 而我打印 createStream 吗?