In this section, we noted that it was not only illegal but meaningless to try to add two pointers. Why would adding two pointers be meaningless
belongs to book: C++ Primer|Stanley B.Lippman, Josee Lajoie, Barbara E.Moo|5th Edition| Chapter number:3| Question number:3.38
All Answers
total answers (1)
The value of a pointer is the address of the object it points. When adding two pointers, the result is sum of two address which means an unknown place in memory. Thus adding two pointers are meaningless.
need an explanation for this answer? contact us directly to get an explanation for this answer