This program is real rubbish, old style headers, conio, half of the code is commented out, system("pause") (don't use it), etc...
My recommendation is:
migrate to standard C++ first, they really should make it a forum rule...
BTW, Does it really hurt you to use code tags:
1) in the Rules you were asked to read when you registered
2) in the text at the top of this forum
3) in the announcement at the top of this forum titled Please use BB Code and Inlinecode tags
4) in the sticky post above titled Read Me: Read This Before Posting
5) any place CODE tags were used
6) Even on the background of the box you actually typed your message in
(as already discovered by valinux):
If you still really want to fix your code, then you should add a check before adding the character to the variable, otherwise there will be an
ENTER in the
pass-string where you compare the real password to, always resulting in a
Non Confirmed message, a simple check might look like this:
if( a != 13 ) pass += a;