Following my last topic I have another question related somehow...

I now have this generic menu function declared like this:
Code:
int menu_function(char **menuops, int nOps);
And I call it with something like this:
Code:
char *menuops[] = {"Option 1", "Option 2", "Option 3"};
int op = -1;

op = menu_function(menuops, sizeof(menuops) / sizeof(char *));
Now, I need to create a new and different array of strings dynamically. I'm opening some directory and get all file names inside that directory (this is already done) and I want to add all those filenames into an array of strings much like menuops so later I can call menu_function with those filenames as menu options.

If I have a variable declared like:
Code:
char *menuops[];
How can I build an array of strings into that variable?