cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Pointer data types
Pointer data types
Jun 6, 2013 at 6:48pm UTC
jasonrobertz357
(56)
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 UTC
vlad from moscow
(6539)
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 UTC
dreyan
(7)
Also, without a type how would it know how much data to read when dereferencing?
Topic archived. No new replies allowed.