天天看点

什么是仿函数

class Func{
     public:
         void operator() (const string& str) const {
             cout<<str<<endl;
         }
 };
 Func myFunc;
 myFunc("helloworld!");
>>>helloworld!```      

继续阅读