So you use the variable j
first in the line
f1 = FormAry[j].Element1;
But you haven't assigned any value to j
previously, hence "uninitialized". The previous mention of j
was in your declaration:
int j;
You need to assign a value to it, like 0:
int j = 0;
That is call "initialization", because if you don't assign any value to a variable, what value should you expect from that variable?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…