摘要: #include #include using namespace std::placeholders;//lambda即匿名函数int main(){ int a = 10; //当return所有的返回都是一个类型就不需要指定返回值的类型,因为编译器会自动推断 //也可以指定返... 阅读全文
posted @ 2014-07-31 22:49 zzyoucan 阅读(791) 评论(0) 推荐(0) 编辑
摘要: #include #include //std::bind返回函数对象void fun1(int a, int b){ std::cout func;//function可以存储函数指针对象,之前以为只能存储std::bind func = fun1; func(5, 6); ... 阅读全文
posted @ 2014-07-31 22:14 zzyoucan 阅读(297) 评论(0) 推荐(0) 编辑