class A { int id; public: A (int i) { id = i; } void show() { cout << id << endl; } }; int main() { A a[2]; a[0].show(); a[1].show(); return 0; }