class Func{
public:
void operator()(const char* str) {
......
}
};
Func func;
func("abc");
stl中有很多类似的实现,就是重载()符号,可以实现类似函数的形式