So the problem I am facing is the following:
On one component, I read file names and store them in an array. There can be a maximum of 100 names of maximum 20 characters in length. This is defined as follows:
static Char_t fileList[100][20] = {};
where
fileList[1]= "name1"
fileList[2]= "name2" and so on.
By creating a function that returns a pointer to it I want to have access to this array of strings from another component of my code:
Char_t** getAllFiles(void)
{
return &fileList;
}
And I assign the pointer like this:
Char_t **fileList = getAllFiles();
This does not seem to work. The best I have achieved is to get the pointer to the first component of the array. But I cannot get the rest of the components.
fileListin the caller?