Initializing an array after declaration
- by robUK
Hello,
gcc 4.4.3 c89
I have the following code as a sample of what I am trying to do. I don't know the actual size of the array, until I enter the function. However, I don't think I can set the array size after I have declared it. I need it global as some other functions will need to access the device names.
Many thanks for any suggestions,
/* global */
char *devices_names[];
void fill_devices(size_t num_devices)
{
devices_names[num_devices];
/* start filling */
}