1/28/2010

memset 問題

Function: void * memset ( void * ptr, int value, size_t num );

Today, when I use memset function to initialize a buffer to "0" , I found that the number of byte must to the actually byte of the buffer+1..

However, The third variable of memset is Number of bytes to be set to the value.

Still don't know the reason of this

沒有留言: