2010-07-22から1日間の記事一覧
#include <functional> #include <iostream> using namespace std; // 関数オブジェクトを定義 class Func{ public: int operator()() { cout << "class str!" << endl; return 1; } }; // 関数を定義 int str() { cout << "func str!" << endl; return 2; } int main(){ function<int ()> </int></iostream></functional>…