Basically, I wish to limit the user to input in the correct format of email address with the code below.
cout << "Donor's Email: ";
cin >> email;
while (email != "@" && email != "."){
cout << "Please enter correct email format." << endl;
cout << "Donor's Email: ";
cin >> email;
}
Somehow, the results are, even I input the correct format of email address but it keeps on looping for me to input again. Somebody please help me. Thanks.