读书人

被逼无奈请这个异常[ ISO C++ forb

发布时间: 2012-03-17 19:06:28 作者: rapoo

被逼无奈,请高手指点这个错误[ 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
{
};

读书人网 >UNIXLINUX

热点推荐