If you've been reading carefully then you won't be having a hard time understanding how to solve problems, however, if you need help then you're in the right place, post you problem and show your attempt. Many C++ users on this forum would be glad to help you.
Expand the password checking program from earlier in this chapter and make it take multiple
usernames, each with their own password, and ensure that the right username is used for the
right password. Provide the ability to prompt user's again if the first login attempt failed. Think
about how easy (or hard) it is to do this for a lot of usernames and passwords. i dont knw if am on d right track with that code.
using namespace std;
int main ()
cout <<"Enter the number of username u want to input: ";
cin >> m;
for (i=0; i<m; i++)
cout <<"Enter your username and password"<<endl;
cout << "username:";
cout <<"password: ";
cout <<"re-enter your username and password"<<endl;
cout <<"Username: ";
cin >> username1;
- I have read Alex Allain's book, he's a good teacher, but his practice problems are very very challenging especially for someone who's just 'jumping' into C++, it's ok to skip few problems and go back to them later.