for( i = 0; i<addr; i++ )
{
int x[i]=true;
if (i==addr)
break;else
continue; /* here should be a pointer with the aim for each address number to be set as true: int x[i]=true; */
}
return (0);
}
----------------------------------
yes, when I want to compile this, the error report of gcc in line 16 is:
"object of variable size may not be initialized"
it is probably not allowed to set an increasing index like i in x[i] as true.
means that then a pointer is necessary ...
how would be the solution for this ? I want that each counting step of i is set as true. Means each address should be set as true.
This programm would perform a platform-independent chip-update e.g. in bios on each mainboard.
No matter which manufactor and no matter which bios-chip.
I ask here, because I had the solution in 2005, but the solution got lost
because of new installation.
...doesn't make sense. First, x is declared as an array of a non-constant size, which is a compilation error in itself. Second, the assignment shouldn't be allowed, unless the braces are used.
@Aramil of Elixia: The compiler will assume the most recently declared x, which is the x declared in the loop.
guys: he redeclared x so if on line 16 he just had x[i] = true then it would be fine because it was given the value x[size_of_array] or in other words 4194304 so the redefinition of x with a non initialized int is what caused the error.