Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Adding things that aren't conceptually indices to indices works the same way in both conventions (so a[idx] and a[idx+k] have k-1 things in between). You miss out on stuffing multiple dimensions into one with a[x*xlen+y], but there's generally no reason to do that.

Could you elaborate about the uses you have in mind?.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: