initialize the smart pointer to nullptr by default

Jul 16, 2015 at 11:19am
Hello,

I have the declared the vector of shared pointer as a member of the class.
Is it necessary to initialize the pointers to nullptr inside the constructor or they are taken care of by default ?

 
std::vector<std::shared_ptr<Triangle>> triangles_;
Jul 16, 2015 at 11:28am
smart_ptr will be nullptr by default.
Topic archived. No new replies allowed.