oid ChangePassStudent(Student*& s, int n, string username) { for (int i = 0; i < n; i++) { if (Compare(username, s[i].Account)) { string resetpass, resetpass2, pass; cout << "Enter the old password: "; cin >> pass; cout << "Enter the new password: "; cin >> resetpass; cout << "Enter password again: "; cin >> resetpass2; if (Compare(pass, s[i].Password)) { if (Compare(resetpass, resetpass2)) { s[i].Password = resetpass; cout << "CHANGED PASSWORD SUCCESSFUL" << endl; } else if (!Compare(pass, s[i].Password) || !Compare(resetpass, resetpass2)) { cout << "CHANGED PASSWORD UNSUCCESSFUL !!!" << endl; } } } } WriteFileStudent(s, n); }