I have a class with some private members containing objects and a dynamic array of pointers which I want to fill with pointers to some of those member object.
class NextionTest : public NextionDisplay {
private:
NexText lblText = NexText(0, 1, "t0");
NexButton btnPage1 = NexButton( 0, 2, "b0");
NexButton btnPage0 = NexButton( 1, 1, "b0");
NexTouch *nex_listen_list[] = {
&lblText,
&btnPage0,
&btnPage1,
nullptr
};
/* rest of class not shown */
};
The above code result in this error:
too many initializers for 'NexTouch* [0]'
How to solve this?