天天看點

什麼是仿函數

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

繼續閱讀