R
rs
Just out of idle curiosity:
1)Regarding pointers; I don't have the standard/grammar with me, but T* for
type T mean pointer-to-T. Does that mean that with a declaration of type
T** is actually a pointer to a type pointer, T*** is a pointer to type
pointer to type pointer and so on?
2) Is there any history behind the use of the "*" operator in providing
dereferencing capabilities or is it arbitrary? How did B handle pointers?
(if it had any). I'm specifically interested in why K&R didn't just
introduce a set of keywords for memory refrencing/derefrencing
3) [OT - But I would appreciate an ans if you have one] C++ has the
reference operator, which, in my limited experience is just a convenient way
of doing pointers; is this so? Is there any major difference in the
semantics or am I right?
4)Is there any practical use for pointers of more than 2 levels of
indireciton? i can't think of any. If this is the case would anything have
been gained (I guess apart from slight grammar simplification and compiler
implementation simplicity) from introducing T** and leaving it at that?
Thanks
1)Regarding pointers; I don't have the standard/grammar with me, but T* for
type T mean pointer-to-T. Does that mean that with a declaration of type
T** is actually a pointer to a type pointer, T*** is a pointer to type
pointer to type pointer and so on?
2) Is there any history behind the use of the "*" operator in providing
dereferencing capabilities or is it arbitrary? How did B handle pointers?
(if it had any). I'm specifically interested in why K&R didn't just
introduce a set of keywords for memory refrencing/derefrencing
3) [OT - But I would appreciate an ans if you have one] C++ has the
reference operator, which, in my limited experience is just a convenient way
of doing pointers; is this so? Is there any major difference in the
semantics or am I right?
4)Is there any practical use for pointers of more than 2 levels of
indireciton? i can't think of any. If this is the case would anything have
been gained (I guess apart from slight grammar simplification and compiler
implementation simplicity) from introducing T** and leaving it at that?
Thanks