4 ms·
C does not provide closures. You can pass around a struct with a function pointer and a data or state pointer though. That will let you achieve the same thing,
by charliesome 14y ago
C does not provide closures. You can pass around a struct with a function pointer and a data or state pointer though. That will let you achieve the same thing, but it won't be as pretty.