So I am attempting to delete all of the variables of a struct from a list, my struct is as so
struct LoginDetails { public: string userName; string userFirstName; string userLastName; string password; string tutor; int userAccess; }; How do I add to the following code to then remove all of what is in the struct.
cout << "Please enter a username to upgrade the account.\n"; cin >> username; for (list<LoginDetails>::iterator itri = loginDetails->begin(); itri != loginDetails->end(); itri++) { if (itri->userName == username) { } }
std::list::erase()then.