//---------------------------------------------------------------------------
void __fastcall TTimeCard::punchINClick(TObject *Sender)
{
string Searchstr;
string Passstr;
typedef map<string, string> mapType;
mapType data;
mapType::iterator iter = data.begin();
// let's declare some initial values to this map
data["Jay Jeffries"] = "jay";
data["Walter Flores"] = "walter";
data["James Guy"] = "james";
data["Edwin Andrade"] = "edwin";
data["Richard Cuellar"] = "richard";
Searchstr = Employee->Text.c_str();
Passstr = passwd->Text.c_str();
iter = data.find(Searchstr);
if (iter->second == Passstr)
ShowMessage("Good password");
else
ShowMessage("Bad Password");
... more file processing code follows
}
This compiles and the corresponding messages display. But I want to stop when someone enters the wrong password and clear all the textboxes and start over.
Admin Edit: Please use code tags when posting your code. Code tags are used like so =>
Thanks,
PsychoCoder

New Topic/Question
Reply




MultiQuote






|