While trying to filter the MainMenu array
const byte menuLength = 10;
struct Menu {
    int id;
    char Description[16];
    int parentId;
};
Menu MainMenu[menuLength] = {
    { 1, "SYSTEM SETUP   ", -1 },
    { 2, "FUNCTIONS SETUP", -1 },
    { 3, "FIRMWARE VER.  ", -1 },
    //SYSTEM SETUP
    { 4, "< BACK         ", 1 },
    { 5, "MODEL SELECT   ", 1 },
    { 6, "RX SETUP       ", 1 },
    //FUNCTIONS SETUP
    { 7, "< BACK         ", 2 },
    { 8, "REVERSE        ", 2 },
    { 9, "ENDPOINTS      ", 2 },
};
with this one
Menu GetSub(int parentId)
{
    int position = 0;
    Menu Filtered[menuLength];
    for (int i = 0; i < menuLength; i++)
    {
        if (parentId == MainMenu[i].parentId)
        {
            Filtered[position] = MainMenu[i];
            position++;
        }
    }
    return Filtered;
}
I get the following errors
- 'Menu' does not name a type
- could not convert '(Menu*)(& Filtered)' from 'Menu*' to 'Menu
So, how am i supposed to return the filtered array?
 
     
     
    