-1
#include "2d/Vector2D.h"
#include <list>
#include "../../AbstTS.h"
class AbstRB;
class fTS: public AbstTS
{
public:
fTS(AbstRB* owner);
void Update();
void closestBotStrategy();
};
class fGCBS
{
public:
fGCBS(AbstRaven_Bot* owner);
void pickTarget();
};
#endif
上面是我的代码,我想从fTS类中的fGCBS类访问pickTarget()。我知道我必须创建这个fGCBS的实例,但我不知道如何做到这一点,任何帮助表示赞赏 感谢你创建类的实例
我该如何做到这一点 – 2013-04-08 14:56:20
@AlanFletcher您需要调用“fGCBS(AbstRaven_Bot * owner);”,为形式参数所有者提供实际参数。 – 2013-04-08 14:59:34
谢谢你的帮助,但我还是不明白这个 – 2013-04-08 16:30:54