编译出错:missing storage-class or type specifiers!!!

happydeer
博客专家认证
2001-07-02 12:07:53
我在一个类里面定义一个CFilterGraph(自定义类)对象,但是编译时却出现以上错误。可是,我明明在上面包含了头文件FilterGraph.h,真搞不明白,难道编译器看不到?!
...全文
3565 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
happydeer 2001-07-02
  • 打赏
  • 举报
回复
// FilterGraph.h: interface for the CFilterGraph class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_FILTERGRAPH_H__19903DB4_110C_4DC9_8A9C_A839009CAC29__INCLUDED_)
#define AFX_FILTERGRAPH_H__19903DB4_110C_4DC9_8A9C_A839009CAC29__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "global.h"

#define SAFE_RELEASE(x) { if (x) x->Release(); x = NULL; }

// Filter graph control in this application
class CFilterGraph
{
public:
// filter graph interface
IFilterGraph *m_pFG;
// graph builder interface
IGraphBuilder *m_pGB;
// media control interface
IMediaControl *m_pMC;
// video window interface
IVideoWindow *m_pVW;
// media event interface
IMediaEventEx *m_pME;
// media seeking interface
IMediaSeeking *m_pMS;
// basic audio interface
IBasicAudio *m_pBA;
// basic video interface
IBasicVideo *m_pBV;
// Filter running flag
bool m_bRun;

Buffer *m_pBuffer;

// Memory stream
CMemStream *m_pSourceStream;
// source filter
CMemReader *m_pSourceReader;

public:
int SetWindowPosition(int nLeft, int nTop, int nWidth, int nHeight);
CFilterGraph(Buffer *pBuffer);
virtual ~CFilterGraph();

};

#endif // !defined(AFX_FILTERGRAPH_H__19903DB4_110C_4DC9_8A9C_A839009CAC29__INCLUDED_)


// VodSession.h: interface for the CVodSession class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_VODSESSION_H__9310DF7B_A231_4D19_BE99_E201C5C97F6F__INCLUDED_)
#define AFX_VODSESSION_H__9310DF7B_A231_4D19_BE99_E201C5C97F6F__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "TransSocket.h"
#include "FilterGraph.h"

class CVodSession
{
public:
// socket which serve for the session
CTransSocket *m_pSocket;
// Filter graph to decode the stream for this session
CFilterGraph *m_pDirectShow; ////////////报错//////////////////////
// buffer for this session
Buffer *m_pBuffer;
// Initialize flag
// bool m_bInitFlag;
// Display Area
CRect m_rect;
// Channel number on the server
int m_nChannelNumber;
// Socket init flag
bool m_bSocketInit;


public:
//
int EndTrans();
// End transmission and disconnect
int CloseSession();
// Connect
int OpenSession(char * lpszServerAddr, char *lpszUserName, char *lpszPassword, int nChannelNum);
// Begin to transmission
int BeginTrans();
// Set window position
int SetWindowPosition(int nLeft, int nTop, int nWidth, int nHeight);
CVodSession();

virtual ~CVodSession();
};

#endif // !defined(AFX_VODSESSION_H__9310DF7B_A231_4D19_BE99_E201C5C97F6F__INCLUDED_)
wjyasd 2001-07-02
  • 打赏
  • 举报
回复
发过来看看!
wjyasd@sina.com
happydeer 2001-07-02
  • 打赏
  • 举报
回复
高手指点一下吧!!!
happydeer 2001-07-02
  • 打赏
  • 举报
回复
急!
happydeer 2001-07-02
  • 打赏
  • 举报
回复
我摸索出来了,才看到各位仁兄的高见。不过分照加!
wjyasd 2001-07-02
  • 打赏
  • 举报
回复
估计也不是什么大问题! 这个提示我也见过!

有些头文件放的不是地方,调整一些就好了
nustchen 2001-07-02
  • 打赏
  • 举报
回复
头文件不要嵌套包含,你是不是在global.h中或其他文件中包含了VodSession.h,造成了嵌套包含。解决方法就是在VodSession.h中不包含头文件,而是在前面加入类说明:
class CFilterGraph
即可。
xtra 2001-07-02
  • 打赏
  • 举报
回复
CTransSocket从什么继承过来的?

#include "TransSocket.h"
#include "FilterGraph.h"对调试试看?

16,472

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧