
3 Nov
2012
3 Nov
'12
1:03 a.m.
Nathan Crookston wrote:
To be clear, is there still a version that would initialize the array to a particular value?
Yes,
shared_ptr<int[]> sp5 = make_shared<int[]>(number_of_ints, 5);
will still work.
While I'd prefer to only initialize if an initializer is given (like std::vector<int>), ...
std::vector<int> initializes to zero. :-)