[RESOLVED] wcsncpy_s function question
Hello to everyone.
I have a simple, little question.
I am writing the following code:
Code:
wchar_t wValore[20] ;
wchar_t Descriz[] = TEXT("ciao") ;
wcsncpy_s(wValore, ARRAYSIZE(wValore), Descriz, _TRUNCATE) ;
wcsncpy_s function put correctly "ciao" string in wValore, then insert the NULL character, and then fill my string wValore with "fe" characters. Does anyone know why it fill the rest of the string with "fe" characters? I can see it with memory window inside VC2008
Thank you
Re: wcsncpy_s function question
From MSDN (http://msdn.microsoft.com/en-us/libr...43(VS.80).aspx )
Quote:
The debug versions of these functions first fill the buffer with 0xFD. To disable this behavior, use _CrtSetDebugFillThreshold
Re: wcsncpy_s function question