try this... it doesn't check every character but it is case sencitive..
Code:
#include <iostream>
#include <windows.h>
#include <conio.c>
#include <string>
#define PASSWORD "pooh"
int main()
{
char pass[50];
char name[50];
int age;
cout<<"Name:";
cin>>name;
cout<<"\nAge:";
cin>>age;
clrscr();
cout<<"Name: "<<name<<"\nAge: "<<age;
Sleep(3000);
clrscr();
Sleep(1000);
cout<<"A small hint...";
cout<<"\n\nThe password is: "<<strlen(PASSWORD)<<" characters long";
Sleep(2000);
clrscr();
cout<<"Password: ";
cin>>pass;
if(strcmpi(PASSWORD, pass) == 0)
{
cout<<"\n\nCorrect...";
Sleep(2500);
return 0;
}
else
{
while(strcmpi(PASSWORD, pass) != 0)
{
cout<<"\n\nIncorrect...";
Sleep(2500);
clrscr();
cout<<"Password: ";
cin>>pass;
}
cout<<"Correct...";
Sleep(2500);
exit(1);
}
}