Does this function has the same behavior that memset?
inline void SetZeroArray( void *vArray[], unsigned int uArraySize )
{
for(unsigned i=0; i<=uArraySize; i++ )
vArray[i] = NULL;
}
int main( int argc, char *argv[] )
{
unsigned int uLevels[500];
SetZeroArray( (void**)uLevels, 500 );
unsigned int ulRLevels[500];
memset( &ulRLevels, 0, sizeof( ulRLevels ) );
system("pause>nul");
return EXIT_SUCCESS;
}
NO, your function does not behave the same as
memset. Your function sets a pointer to NULL andmemsetsets the values of the data to the value supplied.Different things altogether.