Thomas Hruska a écrit : > [EMAIL PROTECTED] wrote: > >> Hi, >> >> why don't you use std::vector ? >> >> std::vector<int> p(10); >> > > That won't initialize the data. It is a better approach than using > new/delete but doesn't solve the OP's problem (whatever the actual > problem is). > >
What do you mean by "won't initialize" but you are probably wrong about wrong. In this case, each int will be initialize by int() which is 0. This is the behavior of std::vector as a template container.
