I'm pretty new with C++ so I'm not very sure on all the "lingo", but any help is appreciated.
This is the IF statement from my program:
if (A.user == "Josh Sarge")
{
cout << "" << endl;
cout << "Program Now Processing...Please Wait..." << endl;
Sleep (2000);
Sleep (1000);
cout << "Name Is Correct" << endl;
cout << "" << endl;
Sleep (2000);
cout << "Welcome Josh!" << endl;
system("pause");
}
else
{
cout << "" << endl;
cout << "Program Processing. Please Wait..." << endl;
Sleep (2000);
Sleep (1000);
cout << "Please Enter Your Full Name" << endl;
cout << "" << endl;
}
};
Now it does work if the name is correct, but I want the program to loop back if it's wrong. So basically, if someone entered the wrong name, the program would say "Please Enter Your Full Name" until the correct name was input.
Thank you.
God Bless
ASKER
Thank you for your response, when I use your code, I get these errors:
error C2059: syntax error : ')'
error C2143: syntax error : missing ';' before '{'
I'm probably doing something stupid, but I don't know what to do with it now.