2 ms·
It's so you can do exactly what's being done here - see if you have reached the end of the array by comparing the current position pointer. Lots of iterator de
by kimixa 5y ago
It's so you can do exactly what's being done here - see if you have reached the end of the array by comparing the current position pointer.
Lots of iterator designs have a special "end" iterator you can compare against but not deference or access - this is just the same for C arrays.
The C standard here allows pointers to elements one past the array, but it's still busted if you try to dereference it.
- SV_BubbleTime 5y agoMakes sense. I got what they were doing but in my head combined the C statement of addressing and accessing/dereferencing.