Servé Laurijssen wrote:
Is it possible for an array to be initialised like this:
int arr[10] = { 0..9 };
So that the array holds 0 to 9 after that?
Nope, at least not that convenient. So, it's back to
int i;
int arr[10];
for (i = 0; i < sizeof arr/sizeof arr[0]; i++)
arr[i] = i;
You probably could provide a macro which is replaced by something
like that but I'd advise against that.
If you have several lengthy manual initialisations like that, put
them in a separate functions.
Cheers
Michael
--
E-Mail: Mine is an /at/ gmx /dot/ de address.