Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

QUICK QUESTION, ACT NOW

Name: OMGS HELP NOW!!! 2008-05-21 16:17

If I typecast a pointer to a different kind of pointer, and incrementz the pointer, will the pointer be incremented by the amount accordiing to the typecast or the real pointer?

Example:

[b]long[/b]* ptr;

([b]char[/b]*) ++ptr;


Which is the result?
A) ptr is increased by sizeof(long)  (ie. 4)
B) ptr is increased by sizeof(char)  (ie. 1)

thx in advance, kindly /prog/ warriors

Name: Anonymous 2008-05-21 18:01

>>9
What?

Just tell me how to increase the pointer by only 1 byte instead of 4

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List