|
-
October 29th, 2009, 05:24 AM
#1
[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
-
October 29th, 2009, 06:26 AM
#2
Re: wcsncpy_s function question
From MSDN (http://msdn.microsoft.com/en-us/libr...43(VS.80).aspx )
The debug versions of these functions first fill the buffer with 0xFD. To disable this behavior, use _CrtSetDebugFillThreshold
Victor Nijegorodov
-
October 29th, 2009, 07:22 AM
#3
Re: wcsncpy_s function question
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|