g ++ warnings, built-in virtual function used but not defined

I now have a problem with warnings that I cannot get rid of. My code works fine, but this warning continues to appear:

ChildModel.h: 136: 24: warning: built-in virtual int function ChildModel :: getLinkCost (const Link &) const is used, but never defined [enabled by default]

Currently, I found this post on SO, with the same problem, but the answer is specific to the library (it defines something), so it does not work for me.

My code is as follows:

class Model {
public:
    virtual inline int getLinkCost(Link const& link) const;
};

class ChildModel: public Model {
public:
    /** Warning on the line bellow: **/
    virtual inline int getLinkCost(Link const& link) const;
};

, ChildModel Model::getLinkCost, Model::getLinkCost Model. C++ Model.cpp.

+4
1
+13

Source: https://habr.com/ru/post/1547610/


All Articles