When working with a character array:
I normally check to see if it is a null string by:Code:char name[256] = "";
or I match along the string looking for '\0' when I parse strings some times.Code:if (name[0] == '\0') ...
at times I might even do this:
Question is, if now I declare name[256] as:Code:switch (name[i]) { case 'A': ... ... case 'B': ... ... }
how should my code be changed accordingly, if I will be creating the app for use in both char and wchar_t cases?Code:Tchar name[256]=L"";
Thanks,
MC