M
Mercy
I guess my C++ is pretty darn rusty. I was just looking over sample
C++ code for practice... and I'm kind of confused about this code
fragment:
int sector2[512];
int i = 3;
memset(sector2, 128+i, 512);
memset(sector2+256, 255-i, 256);
I ran the code frag in visual studios, so I know what it does. But ...
I've don't remember ever seeing arithmetic done on an array variable
before. What exactly does sector2+256 mean? Does it just kinda of
change the starting memory address of the variable sector2?
Any help would be appreciated
-Mercy
C++ code for practice... and I'm kind of confused about this code
fragment:
int sector2[512];
int i = 3;
memset(sector2, 128+i, 512);
memset(sector2+256, 255-i, 256);
I ran the code frag in visual studios, so I know what it does. But ...
I've don't remember ever seeing arithmetic done on an array variable
before. What exactly does sector2+256 mean? Does it just kinda of
change the starting memory address of the variable sector2?
Any help would be appreciated
-Mercy