behavior of memset

Posted by Vinicius Horta on Stack Overflow See other posts from Stack Overflow or by Vinicius Horta
Published on 2012-06-22T21:14:04Z Indexed on 2012/06/22 21:16 UTC
Read the original article Hit count: 159

Filed under:

Does this function has the same behavior that 'memset'?

(Oops! Your question couldn't be submitted because:

Your post does not have much context to explain the code sections; please explain your scenario more clearly.

)

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;
}

© Stack Overflow or respective owner

Related posts about c++