Posts

Showing posts from February, 2022

problem

  #include <iostream> #include <string> #include <vector> using namespace std ; class tt { public: int * data ;     tt ( /* args */ );     ~tt ();     tt & operator= ( const tt & rhs ){         if ( this ==& rhs )         return * this ;       delete data ;             //for obj to obj like (jon = kevin) line number 46       data = new int ;       * data =* rhs . data ;       return * this ;     } tt & operator= ( tt && rhs ){       if ( this ==& rhs )       return * this ;       delete data ;               //for R value to pointer pointing to like line nuber 45 and 47       data = new int ;       * data =* rhs . data ;       rhs...