Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Roster::remove(string studentID) {
- bool toRemove = false;
- for (int i = 0; i < 5; i++) {
- if (classRosterArray[i] != NULL && studentID == classRosterArray[i] -> getStudentID()) {
- classRosterArray[i] = nullptr;
- toRemove = true;
- break;
- }
- }
- if (!toRemove) {
- cout << "Student: " << studentID << " not found." << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement