I need to input a space, a tab, and a comma from keyboard and then judge if the input is a space, a tab, or a comma. I used the following code but it doesn't work.
bool ST, COMMA;
AnsiString HH;
HH = Edit1->Text;
strcpy(CR, HH.c_str());
if (CR == " " || CR == " ") //the first CR is a space and the second CR is a tab
{
ST = true;
}
else if (CR == ",")
{
COMMA = true;
}
else Edit2->Text = AnsiString("Bad Input!");
Can some one help me out?
Another question is if I use ST[1], and use ST[CR], what should I do for the code?
Thx!