There is no way to do this for raw arrays. You can achieve similar result with std::vectors'
explicit vector (size_type n, const value_type& val = value_type(),
const allocator_type& alloc = allocator_type());
:
std::vector<foo> my_vector(45, 10);
will create vector with 45 foo
objects, each created via foo(10)
constructor call.