How to make a menu with submenus?

I think I should do something like this:

struct MENU
{
  char *title;              // menu title
  MENUITEM *items;          // menu items
  int numItems;             // number of menu items
  int selected;             // item that is selected
  struct MENU *parentMenu;  // parent menu of this menu
};
struct MENUITEM
{
  char *title;                // item title
  bool (*action)(void *ptr);  // function to execute
  void *param;                // parameter for function to execute
  struct MENU *subMenu;       // submenu for this menu item
};

Now I need menu items and a way to display and interact with it