Hi guys!
I want to use designated initializers, but what about the others index that aren't initialized?
Are they spend my memory too?
for example:
EDIT PART: {
int array[590] = {[2] = 1};
note: I don't use the other array index, like this example i want to use only one, but i will allocate memory for another index?
(okey I know that this example is vague, i don't want only one int or any other type, I don't know how to explain what I want. But I think that explain it is not necessary because my question is not 'how to accomplish this' my question is 'whats happen when I do it?' or 'how it is implemented?', thanks a lot.)
what about the memory in this? I waste 590 piece of memory, or only one? If the first is correct, how Can I spend only one?
and if I do this:?
int array [] = { [2] = 1, [590] = 2};
I will allocate 590 piece of memory, or only two?
}
Thanks so much!