日期:2014-05-16  浏览次数:20573 次

被逼无奈,请高手指点这个错误[ ISO C++ forbids declaration of ‘CQueue’ with no type]
被逼无奈,请高手指点这个错误[   ISO   C++   forbids   declaration   of   ‘CQueue’   with   no   type]


我的.h文件里面有一个:
……
CQueue   *   m_pParent;
……

提示错误就是:NShortPath.h:47:   error:   ISO   C++   forbids   declaration   of   ‘CQueue’   with   no   type

------解决方案--------------------
CQueue应该是个模板,你少了模板参数。
------解决方案--------------------
呵呵,我猜是你的cqueue定义的时候少了分号
class CQueue
{
};