4 ms·
Yeah, out of all these only the "most vexing parse" struck me as somewhat obscure simply because it's so insidious. The rest... not really that obscure. I mean,
by 10098 13y ago
Yeah, out of all these only the "most vexing parse" struck me as somewhat obscure simply because it's so insidious. The rest... not really that obscure. I mean, come on. a[3] equivalent of *(a+3)? That's just pointer arithmetic. Most of the other stuff is probably intermediate level.
- Jare 13y agoMost people understand that a[3] and *(a + 3) yield the same result, not that they are actually identical in terms of language syntax.
- jheriko 13y agothey really aren't identical in the general case - this is a mistake on the part of the author. trivially consider the case where i overload operator[]...
- CJefferson 13y agoYes, this is more of an obscure C feature (they are exactly the same in all cases in C, the standard defines a[b] as *(a+b)), which is inherited by C++.
- the_af 13y agoThey are trivially not identical in terms of syntax: one uses ( and the other [. Surely you mean in terms of what operation they both represent?