c++ - SFML- Missing ';' before identifier -
i want player create object of class bullet. result:
syntax error : missing ';' before identifier 'bullet'
from i've can find issue bullet class isn't known compiler @ point, how make known?
player class
class player :public entity{ private: float velocity; sprite titlesprite; texture titletexture; sprite playersprite; texture playertexture; bullet bullet; // <----------- public: virtual void draw(rendertarget& target, renderstates states)const; virtual void update(float dt); void moveplayer(float offset); sprite getplayersprite()const; sprite gettitlesprite()const; bullet getbullet(); player(); virtual ~player(); };
bullet class
#include "player.h" class bullet : public entity{ private: sprite bulletsprite; texture bullettextucre; public: void shootbullet(float offset); sprite getbulletsprite()const; sprite getbullettexture(); void setbulletsprite(sprite bulletsprite); virtual void draw(rendertarget& target, renderstates states)const; virtual void update(float dt); bullet(); virtual ~bullet(); };
looks bullet class doesn't include entity.h
Comments
Post a Comment