B3 10 Points Class Name Public Private D Weak Ptr Wptr Name String Name Cs Share Ptr Sptr Q37222875

B.3-10 Points class Name public: private: d; weak ptr<Name> WPtr: Name) ) string name CS ); share ptr<Name> sPtr nullptr);

B.3-10 Points class Name public: private: d; weak ptr<Name> WPtr: Name) ) string name “CS” ); share ptr<Name> sPtr nullptr); void func () unique_ptr<Name obj // #1 Insert Code make unique<Name> int main) // #2 Insert Code return e; (#1 Insert Code): write code to keep the object which obj owns alive outside of the scope of func and wPtr reference obj (#2 Insert Code]: write code to test if wPtr is dangling. Is it dangling or

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.