Your return type is char**, while you're assigning it to char**[], that's incompatible.
Other than that you should post the actual code that you have problem with, the code you posted doesn't compile and doesn't make much sense.
In order to fix your code, the function should be returning char **[NUMBER]. Note also, that you're casting the return value to char* instead of char** that you declared (or char **[NUMBER] that it should be, and in fact - is).
Oh, and returning a pointer to a local variable, as you do in your case, is a perfect recipe for crashes and undefined behavior.
What you probably meant was:
char *array[NUMBER];
int ret = build_array(array, NUMBER);
// do something with return value or ignore it
and in an imported file
int build_array(char **arr, int size)
{
// check that the size is large enough, and that the
// arr pointer is not null, use the return value to
// signal errors
arr[0] = "A";
arr[1] = "B";
return 0; // asume 0 is OK, use enums or defines for that
}
stringsdefined? Why do you take a pointer to a literal string? Etc...arraysupposed to bestrings? Are you trying to return a pointer to a stack allocated object?