There is a function with a header such as this:
BPS_API int dialog_event_get_filebrowse_filepaths(bps_event_t* event,
char** file_paths[], int* num_paths);
This is from BlackBerry 10's Native SDK for anyone wondering (it can be found here).
The question is: what am I supposed to provide as the second argument. This function should populate an array of char pointers in order to return the file paths selected.
I tried to call it this way:
char* ar[2];
dialog_event_get_filebrowse_filepaths(event, &ar, &number_paths);
And I am getting an error from QNX Momentics as such:
cannot convert 'char * (*)[2]' to char * * * for argument 2 to int
dialog_event_get_filebrowse_filepaths(bps_event_t *, char * * *, int *)
This seems the most logical way to call it. It needs the memory address of an array of pointer in order to set them, as far as I understand. However, if I declare:
char** ar[2];
dialog_event_get_filebrowse_filepaths(event, ar, &number_paths);
It works, but this way I created an array of pointers to char pointers (an array of arrays of char*). Is this what I should really provide to the function?