Dont write such
spaghetti code but use some class design with functions to make your homework easier better understandable. Also use spreaking names and insertion of the code. Like
class PasswordEncryptor {
public:
PasswordEncryptor(String password);
bool prepareForList();
private:
list<char> password;
}
I guess that you havent used "the least significant digit from the ASCII of the next character." but the current.
Read your instructions carefully and try to get some test data and write it as test to verify your solution.
Good lucke