Quote Originally Posted by dtkokovoko View Post
So, to summarize what I think I understand from the collective response is make the code understandable first, try to avoid using pointers unless you really need to (simplifying string handling, managing allocated memory, etc.), and try to balance use of pointer and indices. Only carry fine tuning further when performance and measurement dictate. Does that sum it up pretty well?
No it doesn't.

Yes, make the code readable and understandable. And don't worry about fine tuning performance unless there is a demonstrated need.

However, as to using pointers versus arrays/indices, you've got it wrong (admittedly because Adak does too).

For some jobs, it is best to use arrays and indices. For others, it is better to use pointers. For some things, it doesn't matter which you choose.

The thing is, whichever approach you use, imagine how you would go about explaining your code to someone else - preferably someone else who has only a little knowledge about what pointers and arrays are.