4 ms·
The point was probably that it is not obscure; it's what you had to learn when using plain C in the first week.
by _pmf_ 14y ago
The point was probably that it is not obscure; it's what you had to learn when using plain C in the first week.
- Poyeyo 14y agoAnd the next week, and six months after that, again.
- eswangren 14y agoSeriously? It's not a difficult concept to understand...
- ycombobreaker 14y agoWhile it's definitely a rarely-used feature, the equivalence a[b] == *(a + b) == b[a] is fundamental to pointer math. Once you grok pointer math, then this is an interesting bit of syntax trivia and should not be forgotten easily.
- axusgrad 14y agocalling a[5] isn't obscure, but 5[a] sure is!
- papsosouid 14y agoExcept you didn't have to learn it as part of learning C, you didn't have to learn C to learn C++, and I would bet 99% of C and C++ programmers have no idea that 5[p] is valid code.