#include <iostream>
using namespace std;

class department
{
public:
	int id;
};

class B : public department {
};

void max(department *depts, int count)
{
	for(int i = 0; i < count; ++i) {
		cout << "depts[" << i << "].id = " << depts[i].id << endl;
	}
} 

int main()
{
    B a[10];
	for(int i = 0; i < 10; ++i) {
		a[i].id = i+1;
	}
	
    max(a, 10);
    return 0;
}