#include struct Foo { int val; Foo() : val(25) {} Foo(int x) : val(x) {} Foo(int x, int y) : val(x*y) {} }; int main(int argc, char** argv) { // array[0] calls converting constructor // array[3] calls default constructor Foo array[4] = { 5, Foo(10), Foo(5, 10) }; // 5, 10, 50, 25 for (int i = 0; i < 4; ++i) { std::cout << i << ": " << array[i].val << std::endl; } return 0; }