Hi recently I try to do something like the following:
char buf[6] = { 'a','b','c','d','e','f'};
char combination[2] = { buf[3], buf[2] };
and the C compiler gives me error "illegal constant expression"
Does anyone know why the code is wrong?
What I am trying to do is create an array of elements in
display order (which one gets drawn first).
And another array of the same elements that are sorted by
access priority. If the above code is illegal, what's my alternative?
sincerely,
Ming
char buf[6] = { 'a','b','c','d','e','f'};
char combination[2] = { buf[3], buf[2] };
and the C compiler gives me error "illegal constant expression"
Does anyone know why the code is wrong?
What I am trying to do is create an array of elements in
display order (which one gets drawn first).
And another array of the same elements that are sorted by
access priority. If the above code is illegal, what's my alternative?
sincerely,
Ming