void Registrar::enrollStudentInCourse(const std::string& student, const std::string& course) { Student* student == NULL; Course* course == NULL; for(size_t i = 0; i < students.size(); i++){ if(students[i]->getName() == student){ student = students[i]; } } for(size_t i = 0; i < courses.size(); i++){ if(courses[i]->getName() == course){ course = courses[i]; } } if(student != NULL && course != NULL){ course->addStudent(student); student->addCourse(course); } else{ cout << "Could not find student or course during enrollment" << endl; } }