#include <iostream>
#include <vector>

namespace A 
{
 class Parent
 {
  public:
   Parent (int a, int b, int c, int d);

  protected:
   std::vector<double> rmats_;
 };
}
A::Parent::Parent (int a, int b, int c, int d) {
 rmats_.reserve(3000);
 rmats_.clear ();
 double v = 1.0;
 rmats_.push_back(v);
 std::cout << "size of rmats is " << rmats_.size() << std::endl;
}

namespace B 
{
 class Child : public A::Parent
 {
  public:
   Child(int a, int b, int c, int d);
 };
}
B::Child::Child(int a, int b, int c, int d) : A::Parent(a,b,c,d)
{
 std::cout << "size of rmats in the child is " << rmats_.size() << std::endl;
}

int main ()
{
	B::Child mychild(1,2,3,4);
	return 0;
}