|I'm sorry for you.
C/C++ arrays are zero based.
While there's nothing wrong in liking better one-based arrays, it is wiser remaining stuck with zero-based ones, because:
- You need extra work to make your arrays alive (extra work is generally bad)
- Most people use the opposite convention: that means you have to adapt your data to any time you've to deal with other people code, like libraries, etc..
Neverthless, there are few examples of consistently used one-based arrays, for instance, all "Numerical Recipes" book source code uses it (the authors simply ignore array item
Like all 'alien' conventions it's a bit difficult to grasp immediately, but after some experience with, becomes 'natural'.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke