123456
Student *a; Student *b = new Student(); Student *c = new Student(); a=b; b=c; c=a;
std::swap(a, b);