Mail Archives: djgpp/2004/07/27/15:41:18
Hi all.
--- Paul Wilkins <disk AT paradise DOT net DOT nz> wrote:
> DJ Delorie wrote:
> >> >int U[99]; memset(U, 4, sizeof(U));
> >> >memset fills the memory locations used by U with the value 4.
> >
> > No, it sets it to 0x04040404.
>
> So long as it's an int array, where is the difference? Is it in my
> understanding of potential implications?
The difference is that if int is 16 bits, then each element of U has
been set to 0x0404, which is not equal to 0x0004.
=====
--------------
Lets Go Canes!
__________________________________
Do you Yahoo!?
Y! Messenger - Communicate in real time. Download now.
http://messenger.yahoo.com
- Raw text -