[Boost] learning to use a drop -3-smart

xiaoxiao2021-03-06  37

[20050125] #include #include using namespace std; class display {public: display () {cout << "Start new a class display!" << endl;} ~ display () {COUT << "delete class display!" << endl;}};

INT main () {{boost :: scoped_ptr sp (new display ());} cout << "-------" << endl; return 0;} test results: start new a class display DELETE CLASS Display! -------

转载请注明原文地址:https://www.9cbs.com/read-64741.html

New Post(0)