title: Multiple Inheritance, C++ and Same Method Signature in Multiple Super Classes
body: <p>I have no experience in C++, and I come from a Java background. Lately, I was asked in an interview on why Java would not allow multiple inheritence and the answer was pretty easy. However, I am still curious on how C++ deals with that since it allows you to inherit from more than one class.</p>
  
  <p>Specifically, say there is a class called <code>MechanicalEngineer</code> and another called <code>ElectricalEngineer</code>. Both have a method called <code>buildRobot()</code>.</p>
  
  <p>What happens if we make a third class <code>RoboticsEngineer</code>, that inherets from both and does not override that method, and you just call:</p>
  
  <pre><code>(some instance of RoboticsEngineer).buildRobot()
  </code></pre>
  
  <p>Will an exception be thrown, or the method from one of the super-classes will be used? If so, how does the compiler know which class to use?</p>