Skip to content

Latest commit

 

History

History
8 lines (6 loc) · 541 Bytes

File metadata and controls

8 lines (6 loc) · 541 Bytes

callbackDemo

Demo project showing how to use c type callback to invoke c++ member functions using a lambda function

Comment the #define NO_CLASS line to see the version showing how it is used with a class vs non-class (like traditional c-style callback).

Tasks

  • Create a c function that demostrates using 2 callback functions by reassigning the callback function that is invoked by a static c function.
  • Create a c++ class with 2 member functions that can be used as the callback functions invoked by the c callback function.