jimblumberg, on 12 May 2011 - 07:03 AM, said:
With F defined as F[1001][4] then yes your code will be work. However you are learning/using bad habits. Arrays in C/C++ start at 0 and end at size - 1, trying for force starting at 1 is a bad practice. For one thing you are using more memory than you require. In this case if F is an integer you would be wasting 1000*3*sizeof(int) bytes, and if sizeof(int) is 4 that would be 12,000 bytes.
Jim
Jim
I fully understand that.
But to make the program more user-friendly I decided to keep it this way, at least for now.
Thanks anyway.

New Topic/Question
Reply





MultiQuote



|