title: C++ a way to get all inherited classes info
body: <p>So i have this part of code</p>
  
  <pre><code>class Robot
  {
      public: string Name;
      public: explicit Robot(const string&amp; Name) { this-&gt;Name = Name; }
      public: Robot() { Name = "Robotic"; }
      public: virtual ~Robot() = default;
      public: virtual vector&lt;string&gt; GetCapabilities() = 0;
      public: friend ostream&amp; operator &lt;&lt; (ostream&amp;, const Robot&amp;);
  };
  
  class TalkingRobot : virtual public Robot
  {
      public: explicit TalkingRobot(const string&amp; Name) { this-&gt;Name = Name; }
      public: virtual ~TalkingRobot() = default;
      public: vector&lt;string&gt; GetCapabilities() { return { "Talking" }; }
  };
  
  class WalkingRobot : virtual public Robot
  {
      public: explicit WalkingRobot(const string&amp; Name) { this-&gt;Name = Name; }
      public: virtual ~WalkingRobot() = default;
      public: vector&lt;string&gt; GetCapabilities() { return { "Walking" }; }
  };
  
  class VaxBot : public TalkingRobot, public WalkingRobot
  {
      public: explicit VaxBot(const string&amp; Name):TalkingRobot(Name), WalkingRobot(Name) { this-&gt;Name = Name; }
      public: virtual ~VaxBot() = default;
      public: vector&lt;string&gt; GetCapabilities() { return { "Talking","Walking" }; }
  };
  </code></pre>
  
  <p>They have a virtual function GetCapabilites().<br>
  Is there a way to rewrite GetCapabilites() in my VaxBot class to return all the inherited classes return values so that i dont have to explicitly write them like i did in here?</p>