We have code like this in an old parser we wrote:
Now if we use the generic data type TCHAR, do we code it like this?Code:char *word; ... ... switch (*word) { case 'A': ...; break; case 'B'; ...; break; case '-'; ...; break; ... }
or does the switch statement assumes a single byte character?Code:TCHAR *word; ... ... switch (*word) { case _T('A'): ...; break; case _T('B'); ...; break; case _T('-'); ...; break; ... }
Thanks,
MC