object identity and vector erase()
This might take a look of explanation, but i want to make my problem clear. I have two classes one called Student and the othe Course, each one points to each other and preserves object identity. the Student class has a vector of Course* (course pointers) and Course has a dynmaic array of Student pointers. I need to write a function called
This function must use iterators to remove the Course form the student and also the Course must then remove the student.
void drop_course(Course* c) //Student function that takes a course //pointer
Also i need to write a function in my driver that will drop all the courses the student is in.
Again i must use iterators
Does any one have any advice im fairly new to the concept of object identity and the use of iterators.