error LNK2019, 寻求帮助!!!

傻傻de点点 2008-06-24 11:13:16
#ifndef BUGMANAGER_H
#define BUGMANAGER_H

#include "Bug.h"
#include "Hunter.h"

#include "hge.h"
#include "hgesprite.h"

struct BugAttribute
{
BugAttribute();

BugAttribute( float _x, float _y, float _dx, float _dy, bool _alive )
{
x = _x;
y = _y;
dx = _dx;
dy = _dy;
alive = _alive;
}

float x,y;
float dx,dy;
bool alive;
};

class CBugManager
{
public:

CBugManager(HGE* hge);
~CBugManager();

bool Catch();

void Render();
void Update();


private:

HGE* m_pHge;

CHunter* m_pHunter;
BugAttribute* m_pAttribute;

CSlowBug* m_pSlowBug;
CFastBug* m_pFastBug;
CCleverBug* m_pCleverBug;
CBoss* m_pBoss;

int m_iControlNumber;
int m_iRandomNumber;

};

#endif //BUGMANAGER_H


1>BugManager.obj : error LNK2019: unresolved external symbol "public: __thiscall BugAttribute::BugAttribute(void)" (??0BugAttribute@@QAE@XZ) referenced in function "public: __thiscall CBugManager::CBugManager(class HGE *)" (??0CBugManager@@QAE@PAVHGE@@@Z)


寻求高手帮忙,谢谢了!
...全文
79 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
K行天下 2008-06-25
  • 打赏
  • 举报
回复
BugAttribute() 没有定义
xkyx_cn 2008-06-25
  • 打赏
  • 举报
回复

// 如没有初始化工作,直接给个空函数体即可
BugAttribute() {}
king_water 2008-06-25
  • 打赏
  • 举报
回复
给struct BugAttribute 定义个对象,然后 对象.BugAttribute
9527他大爷 2008-06-24
  • 打赏
  • 举报
回复
BugAttribute(); 函数定义呢?
baihacker 2008-06-24
  • 打赏
  • 举报
回复
BugAttribute(); 
没有实现?
wuyu637 2008-06-24
  • 打赏
  • 举报
回复
没有实现bugAttribute()这个函数,或者是实现了这个函数的.cpp文件没有包含到这个工程中。

64,662

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

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