Why is virtual function not being called?

后端 未结 6 1869
挽巷
挽巷 2021-01-26 07:00
//GUITEXT
class guitext : public entity {
public:
    guitext(graphics *gfx, std::string _text, float _x, float _y, 
        float _size, float timeToLive);
    bool upd         


        
6条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-26 07:30

    You're storing Entitys, not pointers to objects of varying derived types of Entity.

提交回复
热议问题