我开始用C++编程和IM得到一个错误,我不能化解或理解错误C2600:这是什么意思?
错误C2600:“kingMobile :: KingChatFilter :: KingChatFilter”:无法定义一个编译器生成的特殊成员函数(必须声明类第一)
这里是代码:
#include "buraco/game/board/model/KingChatFilter.h"
#include "buraco\game/board/model\GamePlayController.h"
#include "boost/lexical_cast.hpp"
#include "s3e.h"
#include "buraco\Player.h"
namespace kingMobile {
KingChatFilter::KingChatFilter() {
//this->gamePlayController = gamePlayController;
}
string KingChatFilter::filter(string msg){
if(msg == "anus"){
return "amigao";
}
return msg;
}
}
这里我有我的.h文件
#include "buraco\game/board/model\CardGroup.h"
#include "boost/function.hpp"
#include "oxygine-framework.h"
namespace kingMobile {
class KingChatFilter : public boost::enable_shared_from_this<KingChatFilter> {
public:
string filter(string msg);
private:
};
typedef boost::shared_ptr<KingChatFilter> spKingChatFilter;
}
你没有声明构造函数。 – chris
(在KingChatFilter.h中的类定义中) –
有我的KingChatFilter.h ...我没有声明那里吗? – user3120770