title: Cpp constructor of a class that is inhereting
body: <p>i've been dabbing abit with cpp after a long while, and i've had a wierd problem that i couldnt not find a way around.
  i have a class called base message, with 2 kinds of constructors, a default empty one, and one that takes 2 arguments:</p>
  <pre><code>BaseMessage();
  
  BaseMessage(int msgId, const string name);
  </code></pre>
  <p>i am now trying to implement a constructor of a class that is a child of the BaseMessage class like so:</p>
  <pre><code>CMicroControllerMainMsg::CMicroControllerMainMsg():BaseMessage(21,&quot;s&quot;), _data{ }
  {
    Encode();
  }
  </code></pre>
  <p>where BaseMessage gets an ID and name, and _data is a struct which i initialize with 0 at the begining. now to the problem, my IDE doesn't allow me to use the constructor of BaseMessage (tells me its an unresolved symbol), but if i use the default empty constuctor it does allow me:</p>
  <pre><code>CMicroControllerMainMsg::CMicroControllerMainMsg():BaseMessage(), _data{ }
  {
    Encode();
  }
  </code></pre>
  <p>so my questions are as follows:</p>
  <ol>
  <li>why can't i use the constructor which takes the parameters?</li>
  <li>can i circumvent the problem like in the example below?</li>
  </ol>
  <pre><code>CMicroControllerMainMsg::CMicroControllerMainMsg(): _data{ }
  {
    BaseMessage(21,&quot;s&quot;);  
    Encode();
  }
  </code></pre>