Quote Originally Posted by iahn13 View Post
as for the array.. yeah, I know that they go from 0 to n-1, however my Professor insists on using arrays from 1 to n
Well, your professor is wrong. In C++, indices are 0-based... always. There is nothing to be gained from these types of tricks to make indices 1-based. At best, you (and all other students) will spend 3 times as long learning how to use arrays. First, you learn to use them with 1-based indices. Then you have to unlearn using 1-based indices and, finally, you have to learn using 0-based indices. That's a total waste of effort.