Hello, is there a way to initialize elements to 0 on dynamic allocation?
int *a = new int(0);
doesn't work..I'm not exactly sure what that does..initialize what to 0?
It looks like a member initializer to me..
this is what I tried..
Code:int *a = new int(0); a = new int ;
but didn't work..It is C++ I am sure there is something, I don't want to end up using calloc
and I don't want to use a loop. :O