Well I was reading a chapter about class inheritance when noticed something strange (for me). The text says
A derived class does not inherit the constructors of its base class.
The reasoning is that this could lead too easily to the introduction of uninitialized derived class member errors.
I find it very strange becuase because when a print some debug information it seems that the constructor(from the base class) is inherited.
Code:
#include <iostream>
using namespace std;

class Base
{
public:
Base() {cout << "Base constructor" << endl;}
};

class SubClass1  : public Base
{
public:
SubClass1() {cout << "SubClass1 constructor" << endl;}
};

int main()
{
SubClass1 test;
return 0;
}
This code clearly shows that both construtors are invoked (inherited???). I also made a seach on this board http://cboard.cprogramming.com/showt...ss+constructor that "confirmed" my suspicions.

Is my book incorrect in this subject???