title: Calling constructor of another class through Initialization list. Having problems
body: <p>This is my sample code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  class Base
  {
  public:
      Base (int v, char z) {x=v;y=z;};
      int x;
      char y;
  };
  
  class Bar
  {
  public:
      Bar(int m, char n):q(m),s(n),base(q,s){};
      Base base;
      int q;
      char s;    
  };
  
  int main()
  {
      Bar barObj(5,'h');    
      cout &lt;&lt; barObj.base.x &lt;&lt; barObj.base.y &lt;&lt; endl;       
      return 0;
  }
  </code></pre>
  
  <p>Why am I getting an output of <code>0</code>?
  <a href="http://ideone.com/pf47j" rel="noreferrer">http://ideone.com/pf47j</a></p>
  
  <p>Also, in general, what is the right method to create a member object in another class and call the constructor of that object, as was done above with object base of <code>class Base</code>, inside <code>class Bar</code>?</p>