May 24th, 2002, 7:48 am
for (int i = 0; i<5; i++) ;for (int i = 0; i<5; i++) ;The compiler tells me that "i" is already defined (in the second "for").......!!!!!!!!!!!!!!!! why?????????????????????The compiler is right, I don't see any pb in that. You typed "int i", this means you declared a variable named i of type int (the compiler will reserve a memory cell to it), then next line you declare a new variable of type int but with the same name as an existing one!!!for (int i=0;.....for (int j=0;....>>Good and will compile-----------------------------int i;for (i=0;.....for (i=0;....>>Not good but will compile-----------------------------for (int i=0;.....for (int i=0;....>>Will not compileHope this helps.Ab