If a size_t is cast to a long, and size_t is the length of a unicode string, does the resulting long need to be divided by sizeof(_TCHAR) in order to get the actual length in _TCHARs?
Carl Daniel [VC++ MVP] - 11 May 2004 15:05 GMT
> If a size_t is cast to a long, and size_t is the length of a unicode
> string, does the resulting long need to be divided by sizeof(_TCHAR)
> in order to get the actual length in _TCHARs?
If the size_t contains the size of a TCHAR string, you should always divide
by sizeof(TCHAR) to get the length of the string.
-cd