C++ version of calloc

In C we can use calloc to intialize a dynamically allocated array all to zero,
I am trying to avoid calloc and use new instead but I cannot initialize to zero. How is that possible?
C++ 03 sections 5.3.4 and 8.5 refer.

You can do this:

new int[10]();

and the array will be initialised with zeros.
Topic archived. No new replies allowed.