passing functor as function pointer

后端 未结 10 2244
旧巷少年郎
旧巷少年郎 2020-11-29 03:52

I\'m trying to use a C library in a C++ app and have found my self in the following situation (I know my C, but I\'m fairly new to C++). On the C side I have a collection of

10条回答
  •  萌比男神i
    2020-11-29 04:45

    I don't think you can: operator() in a function object is really a member function, and C doesn't know anything about those.

    What you should be able to use are free C++ functions, or static functions of classes.

提交回复
热议问题