<pre name="code" class="cpp">
#include<iostream>
using namespace std;
class A
{
public:
char data;
A *start;
A *next;
A *temp;
A *temp1;
A *parent;
};
void main()
{
A a;
a.start = new A;
a.temp = a.start;
a.temp1 = new A;
a.temp->next = a.temp1;
a.temp->next->parent = a.temp;
a.temp = a.temp->next;
delete a.temp->parent->next;
a.temp = NULL;
system("pause");
}