title: C++ Object Construction inside a Class
body: <p>I have three classes; their function definitions are in a sperate file.
  I'm trying to construct an object with various parameters inside another class without using inline implementation.</p>
  
  <pre><code>class A{     
       public:
         A(){}  
  };
  
  class B{         
       public:
           //takes in two ints, one reference to object, and a string 
           B(int x, int y, A &amp;a, std::string s );
  };
  
  class C{        
      public:            
          //in the constructor, construct b_obj with its parameters 
          C();
  
      private:
          B b_obj;
   };
  </code></pre>
  
  <p>How can I make the <code>C</code> constructor construct <code>b_obj</code> with its parameters of the int, the reference to an instance of <code>A</code>, and the string? I tried some methods but I get an error that complains about no match call to the <code>b_obj</code> constructor.</p>