Hiya, I also have a book and am getting into programming. Is your books first assignment called "Hello world" by any chance?
If you want we can help teach each other?
I have skype or msn.
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.
<code>
#include <iostream>
#include <string>
using namespace std;
int main ()
{
int i,m;
string username[i],password[i];
string username1;
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:";
cin >>username[i];
cout <<"password: ";
cin >>password[i];
}
cout <<"re-enter your username and password"<<endl;
cout <<"Username: ";
cin >> username1;
</code>
- 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.