|
-
July 12th, 2010, 07:04 AM
#7
Re: Simple Jacobi Iteration (help please...)
 Originally Posted by iahn13
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.
Cheers, D Drmmr
Please put [code][/code] tags around your code to preserve indentation and make it more readable.
As long as man ascribes to himself what is merely a posibility, he will not work for the attainment of it. - P. D. Ouspensky
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|