global.cpp
MyDecoder.cpp
e:\王竞\练习程序\mydecoder\recvideo\getpic.h(57) : error C2061: syntax error : identifier 'CDecoderVideo'
e:\王竞\练习程序\mydecoder\recvideo\getpic.h(74) : error C2061: syntax error : identifier 'CDecoderVideo'
e:\王竞\练习程序\mydecoder\recvideo\store.h(42) : error C2061: syntax error : identifier 'CDecoderVideo'
e:\王竞\练习程序\mydecoder\recvideo\store.h(46) : error C2061: syntax error : identifier 'CDecoderVideo'
e:\王竞\练习程序\mydecoder\recvideo\ctmndec.h(31) : error C2061: syntax error : identifier 'CDecoderVideo'
e:\王竞\练习程序\mydecoder\recvideo\global.h(429) : error C2061: syntax error : identifier 'CDecoderVideo'
MyDecoderDlg.cpp
e:\王竞\练习程序\mydecoder\recvideo\getpic.h(57) : error C2061: syntax error : identifier 'CDecoderVideo'
e:\王竞\练习程序\mydecoder\recvideo\getpic.h(74) : error C2061: syntax error : identifier 'CDecoderVideo'
e:\王竞\练习程序\mydecoder\recvideo\store.h(42) : error C2061: syntax error : identifier 'CDecoderVideo'
e:\王竞\练习程序\mydecoder\recvideo\store.h(46) : error C2061: syntax error : identifier 'CDecoderVideo'
e:\王竞\练习程序\mydecoder\recvideo\ctmndec.h(31) : error C2061: syntax error : identifier 'CDecoderVideo'
e:\王竞\练习程序\mydecoder\recvideo\global.h(429) : error C2061: syntax error : identifier 'CDecoderVideo'
recon.cppCDecoderVideo是类名,我在另一个类的头文件中如下说明:
void getpicture (int *framenum, int gob, CDecoderVideo* pHost);
会出错,错误如上所示,为什么呢?
MyDecoder.cpp
e:\王竞\练习程序\mydecoder\recvideo\getpic.h(57) : error C2061: syntax error : identifier 'CDecoderVideo'
e:\王竞\练习程序\mydecoder\recvideo\getpic.h(74) : error C2061: syntax error : identifier 'CDecoderVideo'
e:\王竞\练习程序\mydecoder\recvideo\store.h(42) : error C2061: syntax error : identifier 'CDecoderVideo'
e:\王竞\练习程序\mydecoder\recvideo\store.h(46) : error C2061: syntax error : identifier 'CDecoderVideo'
e:\王竞\练习程序\mydecoder\recvideo\ctmndec.h(31) : error C2061: syntax error : identifier 'CDecoderVideo'
e:\王竞\练习程序\mydecoder\recvideo\global.h(429) : error C2061: syntax error : identifier 'CDecoderVideo'
MyDecoderDlg.cpp
e:\王竞\练习程序\mydecoder\recvideo\getpic.h(57) : error C2061: syntax error : identifier 'CDecoderVideo'
e:\王竞\练习程序\mydecoder\recvideo\getpic.h(74) : error C2061: syntax error : identifier 'CDecoderVideo'
e:\王竞\练习程序\mydecoder\recvideo\store.h(42) : error C2061: syntax error : identifier 'CDecoderVideo'
e:\王竞\练习程序\mydecoder\recvideo\store.h(46) : error C2061: syntax error : identifier 'CDecoderVideo'
e:\王竞\练习程序\mydecoder\recvideo\ctmndec.h(31) : error C2061: syntax error : identifier 'CDecoderVideo'
e:\王竞\练习程序\mydecoder\recvideo\global.h(429) : error C2061: syntax error : identifier 'CDecoderVideo'
recon.cppCDecoderVideo是类名,我在另一个类的头文件中如下说明:
void getpicture (int *framenum, int gob, CDecoderVideo* pHost);
会出错,错误如上所示,为什么呢?
如果你的CDecoderVideo声明包含在 CDecoderVideo.h中,#include "CDecoderVideo.h"就可以饿了
我不再包含头文件了。
而是直接在类的头部加上:
class CDecoderVideo;
就可以了。
我猜测这与c语言的用法类似
#include "tmndec.h"
class CDecoderVideo;class getpic
{
int buffered_framenum;
//output