have a look at the comments
//prog to allow supervisor to input 10 passwords and then allow user to try to
//login. Prog should tell user what level of access they have upon entering a
//valid password.Password will be 6 characters long.
const int MAXIMUM = 10;
const int CHARS = 7;
for(int i = 0; i<MAXIMUM; i++)
cout << "Please enter Supervisor password for level " << i + 1 << " access : ";
// this is where your problem is. cin.getline(password, CHARS) retrieves CHARS-1 characters max
// because it null-terminates the string. so you'll only ever get 6 characters in the buffer.
// what you should do is check to see if the length is == to CHARS - 1 like this:
if(strlen(password[i]) != CHARS - 1)
cout << "Invalid length";
By the way, there are other bugs in there... but i'll let you figure them out