What is the specified code snippet of class A for?
сlass A  {
   A * nA;
   A * pA;
   Data  d;
 public:
   void setN(A * p) { nA = p; }
   void setP(A * p) { pA = p; }
   // other code

   ~A() {
       nA->setP(pA);
       pA->setN(nA);
       // other code
   }
};

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
C++ quizzes
Cosmo
Sign Up Now
or Subscribe for future quizzes