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,
NULL
];
/* rest of class not shown */
};
The above code result in this error:
capture of non-variable 'NextionTest::lblText' &lblText,
I tried to move the initialization of the nex_listen_list to a init method but this gives the same result. I have no idea what a capture is.. but seems i'm doing something wrong. How to solve this?