#include #include #include "obj.h" using namespace std; int main() { obj a[] = { obj(10), //Can write name of constructor and parentheses... obj(20), obj(30) }; const size_t na = sizeof a / sizeof a[0]; obj b[] = { 40, //...but don't have to when constructor has 1 arg. 50, 60 }; const size_t nb = sizeof b / sizeof b[0]; for (size_t i = 0; i < nb; ++i) { b[i].print(); cout << "\n"; } return EXIT_SUCCESS; }