I have the following base class
class Grammateas { public: Grammateas(std::string name):_name(name){}; virtual ~Grammateas(){}; private: std::string _name; };
and the next derived class
class Boithos final : public Grammateas { public:
I want to use the base class constructor to create an object like this
Boithos Giorgakis(5); //works Boithos Giorgakis("something"); //Bug
I read that I can use the using keyword, but when I try to use it as
using Grammateas::Grammateas;
The compiler returns a message
error: 'Grammateas :: Grammateas name constructor
Can you help me understand the using keyword with constructors?
c ++ using
Avraam mavridis
source share