J
john smith
I have never really understood the difference between the two notations
below.
I often run into code where they are passing in the address of some
location.
Some people do something like this:
foo( void* p_data ) // pass in a pointer to some data
while I see others do this.
foo( uint32* p_data) // pass in a pointer to some data
Can someone please explain to me why you would choose one over the other.
Someone once told me using the uin32 guarantees alignment on a 32 bit
boundary.
Any help is greatly appreciated.
below.
I often run into code where they are passing in the address of some
location.
Some people do something like this:
foo( void* p_data ) // pass in a pointer to some data
while I see others do this.
foo( uint32* p_data) // pass in a pointer to some data
Can someone please explain to me why you would choose one over the other.
Someone once told me using the uin32 guarantees alignment on a 32 bit
boundary.
Any help is greatly appreciated.