Pointer data types

Jun 6, 2013 at 6:48pm
Why does pointer's declaraction needs an identified data types? If its ok (what I'm currently thinking) if not? I have a feeling that it has many reasons but my brain hurts if I think of it.
Jun 6, 2013 at 7:05pm
Data type is needed that to perform the pointer arithmetic. For example what value will the pointer have after increment?

++p;

Or what will be the value of the difference of two poinetrs?

p - q
Jun 6, 2013 at 7:22pm
Also, without a type how would it know how much data to read when dereferencing?
Topic archived. No new replies allowed.