你好我在互联网上到处寻找答案,但我找不到任何答案.
码:
#ifndef GAME_H #define GAME_H #include "drawEngine.h" #include "sprite.h" #include <iostream> using namespace std; class Game { public: bool run(void); protected: bool getinput(char *c); void timerUpdate(void); private: Sprite* player; // this gives me C2143 double frameCount; double startTime; double lastTime; int posx; //int posy; DrawEngine drawArea; }; #endif
我该如何解决?
sprite.h
#ifndef GAME_H #define GAME_H #include "drawEngine.h" #include "game.h" enum { SPRITE_CLASSID,}; struct vector { float x; float y; }; class Sprite { public: Sprite(DrawEngine *de,int s_index,float x = 1,float y = 1,int i_lives = 1); ~Sprite(); vector getPosition(void); float getX(void); float getY(void); virtual void addLives(int num = 1); int getLives(void); bool isAlive(void); virtual bool move(float x,float y); protected: DrawEngine *drawArea; vector pos; int spriteIndex; int numLives; int classID; vector facingDirection; void draw(float x,float y); void erase(float x,float y); private: }; #endif
解决方法
原文地址:https://www.jb51.cc/c/118954.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。