How do i end the for loop once i press enter.. It's a log-in password so once i press enter it should proceed to the next step but it doesn't.
please help
1 2 3 4 5 6 7
for(int index = 0; index < limit; index++){
pass[index] = getche();
Sleep(50);
cout << "\b*";
if(pass[index] == '\n') // this does not work for me
break;
}