#pragma once #include #include using namespace std; class LoginDetails { private: const string username; string password; static string masterPassword; static string defaultPassword; public: LoginDetails(const string & username, const string & password = defaultPassword); void Display() const; bool ChangePassword(const string & oldPassword, const string & newPassword); static void DisplayClassPasswords(); // This method fails to compile - can't modify const data member. // void ChangeUsername(const string & newUsername) // { // username = newusername; // } };