Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
6 years, 2 months ago.
How can I use lambda functions for callbacks?
There is my code
There is my code
pcContr.addCommand('q', []() { printf("WORKS!"); }); void ControllerPC::addCommand(char command, Callback<void()> cb) { cbCommand[commCount] = command; cbArr[commCount] = cb; commCount++; }
Maybe someone can advice me a better way to make this...