#include using namespace std; struct A { int i; A(int i): i(i) {} }; struct B : A { int j; B(int i): A(i), j() {} }; int main() { A a[] = {A(1), A(2), A(3)}; B b[] = {B(4), B(5), B(6)}; A * p = b; cout << p[1].i << endl; }