Code:#include <iostream> #include <string> using namespace std; class course { private: string name; int credits; int total; public: string getinfo() { int total; cout << "Please ask student the number of courses taken: " << endl; cin >> total; cout << "Test print of " << total << endl; } void printIt() { cout<<"Total courses: "<<total<<endl; } ~course() { cout<<"Destructor is called " <<endl; } }; class registration:public course { private: char *ptr; int credits; string classes; string total; public: void printinfo(); registration(); // ~registration(); void printIt() { course::printIt(); } ~registration() { cout<<"Destructor is called " <<endl; } }; registration::registration() { cout << "Enter class information that student is signing up for." << endl; getline(cin,classes); cout << "Please enter the total number of credits the student is signed up for." <<endl; cin >> credits; }; /*registration::~registration() { cout << "Student x is signed up for: " << classes << endl; cout << "Total number of credits signed up for = " << credits << endl; };*/ void registration::printinfo() { cout << "Student x signed up for: " << total << endl; }; int main() { course *p; string id; registration *ptr; p.printIt(); (THIS IS THE PROBLEM LINE) cout<<"Ask student of courses she or he is registering."<<endl; getline(cin,id); return 0; }