1. c++智能指针中,c++的memory文件中,有auto_ptr等各种关于智能指针的东西,shared_ptr,weak_ptr在C++11中已经成为标准. 也看了ogs的智能指针,每次引用起来比较麻烦,规则也多.方便的是自动的引用计数,可选线程安全. 为方便 写了个公用类,如下: #ifndef _test_share_ptr_h__ #define _test_share_ptr_h__ #define null 0 class student { public: student();…