Defining an initialized int table?
I'm trying to define an array of pointers to strings of ints each of variable length.
I can easily do this with chars like this
Code:
char *StringData[]={
"string1",
"string2,
};
I though maybe something like this would work
Code:
unsigned int *Data[]={
unsigned int []={0x1, 0x2, 0x0};
unsigned int []={0x0f, 0x02, 0x0};
};
I don't want to use a 2d array because I will have a lot of int strings and only a few of them will be long which is going to waste a lot of space. I supose I could define all the data in a 1d array and then create a second array of pointers and asign the pointers to different elements of the first array but I was hoping there was a way to do it as simply with with chars.
I apreachiate any thougs.