And why should I check the string to be concatenated by the following :
1 2 3 4 5
NOTE The preceding technique for preventing an array overrun works forchar strings, not
forwchar_t strings. For wchar_t strings, you will need to use an expression like
if(sizeof(strA) > wcslen(strA)*sizeof(wchar_t) +
wcslen(strB)*sizeof(wchar_t)) // ...
This takes into consideration the size of a wide character.
because strlen does not return the required information when dealing with wide characters. wcslen should be used to compute the space necessary to store the string.