i have an array

weights[16][60]

16 rows of 60 columns

if you are changing indiviual elements it goes from weights[0][0] to weights[15][59] right?

see if im using them in a loop

for instance

]for(int i = 0; i < 16; i++)
{

so each element is used would it be 0 to i < 16 or 0 to i < 15?

Recommended Answers

All 2 Replies

i have an array

weights[16][60]

16 rows of 60 columns

if you are changing indiviual elements it goes from weights[0][0] to weights[15][59] right?

Correct.

see if im using them in a loop

for instance

]for(int i = 0; i < 16; i++)
{

so each element is used would it be 0 to i < 16 or 0 to i < 15?

i < 16 . You want to include 15. If it was i < 15 , that would only go up to 14.

This is a stupid question. You should write small sample programs to verify your understanding of things like this.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.