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