Wednesday, 28 June 2017

Array

Notes for reading C++ Primer 4/e.

Dynamic Array

value-initialize


In dynamic array, it could only initial w/ default value, not like static array, could initial as different values.
int *pia = new int[10]();  // 10 ints w/ default value 0

No comments:

Post a Comment