title: Pass Parameter to Base Class Constructor while creating Derived class Object
body: <p>Consider two classes <code>A</code> and <code>B</code></p>
  <pre><code>class A
  {
  public:
      A(int);
      ~A();
  };
  
  class B : public A
  {
  public:
      B(int);
      ~B();
  };
  
  
  int main()
  {
      A* aobj;
      B* bobj = new B(5);    
  }
  </code></pre>
  <p>Now the class <code>B</code> inherits from <code>A</code>.</p>
  <p>I want to create an object of <code>B</code>. I am aware that creating a derived class object, will also invoke the base class constructor , but that is the default constructor without any parameters.</p>
  <p>What i want is that <code>B</code> to take a parameter (say 5), and pass it on to the constructor of <code>A</code>.
  Please show some code to demonstrate this concept.</p>