#include
using namespace std;
inline void TextFun(void)
{
cout << "普通回调函数" << endl;
}
class TextFunor
{
public:
TextFunor()
{
cout<<"构造"<<endl;
}
~TextFunor()
{
cout<<"析构"<<endl;
}
void operator()(void) const
{
cout << "()重载函数" << endl;
}
};
void ForText(void (*bFun)(void), TextFunor cFun)
{
bFun=TextFun;
bFun();
cFun();
}
int main()
{
TextFunor cFunor;
ForText(TextFun, cFunor);
return 0;
}