MunuItem & Display classes for tree-like menus

I would like to have some abstraction on how to make dynamic menus with flexible structure and sub menus.
I have some code, which works with c++ online editor,

onlinegdb code

but crushes on arduino nano

code attached bellow. So, please help me, as I do not know what’s going wrong

config.h (831 Bytes)

display.h (1.55 KB)

limeWatering.ino (2.06 KB)

menuItem.h (831 Bytes)