9 years, 4 months ago.

subscript out of range error in LXP1768

in middle of my code maximum1[3]=EcgArray5[384]; int Max_loction_4; for ( i=384; i<512; ++i) { if (EcgArray5[i] > maximum1[3]) {maximum1[3] = EcgArray5[i]; Max_loction_4=i; } / it showing subscript out of range"maximum1[3]=EcgArray5[384];" while compiling please help me

1 Answer

9 years, 4 months ago.

Use <<code>> and <</code>> to make it readable.

However in general it means that the array location given is outside the defined size of the array. This is only checked for fixed values: If you for example use an array in a for loop, where you access each iteration another location, it won't check it. Take into account the largest location in an array is the array size minus 1, because it starts at zero!

i need syntax

posted by HIMANSHU BANSAL 25 Dec 2014

i need syntax

posted by HIMANSHU BANSAL 25 Dec 2014