2012年5月18日

摘要: 1 function object就是重载了operator()的类的对象, 像如下例子, 其实也许应该说是定义了operator()的类, 在thinking in c++中operator overloading都并没有提到operator() 1 #include <iostream> 2 #include <string> 3 using namespace std; 4 class Wy { 5 public : 6 string operator()(string msg, int a, int b){ 7 cout << "msg = 阅读全文
posted @ 2012-05-18 12:18 小宇2 阅读(849) 评论(0) 推荐(0) 编辑

导航