example for bind
来源:互联网 发布:刺客信条2mac中文版 编辑:程序博客网 时间:2024/05/18 22:50
#include <iostream>#include <boost/bind.hpp>#include <boost/function.hpp>using namespace std;class People{public:People(const string& name):_name(name){}void SaySomething(const string& msg) const{cout<<_name<<" said: "<< msg << endl;}private:string _name;};void RunSomethingforName(const string& name, boost::function<void(const People&)> f){People p(name);f(p);}int main(int argc, char* argv[]){RunSomethingforName("Mike", boost::bind(&People::SaySomething, _1,"fuck"));return 0;}
0 0
- example for bind
- function object研究之六 bind example
- [JAVA]example for jfreechart
- data abort for example
- Example for PathListBox
- Example for Message Queue
- Example code for LDD3
- Example for Agglomerative Clustering
- Constraints Example for Synthesis
- Go by Example: For
- Example for lua table
- Example for Simple Login
- 【转载】example for NIO
- CryptoDev for OpenSSL example
- Some Example For C++
- A Code Example For SAML
- an example for mouse hook
- The basic example for AJAX
- [C] 可变宏——《C Primer Plus》
- Android开发 解决AlertDialog中的EditText无法调出输入法的问题
- 2014百度之星复赛解题报告:Query on the tree
- 一次curl乱弹
- LINUX CGI编程
- example for bind
- 激发团队工作热情:领导者的职责
- 廉价版iMac性能测试:不如11寸Macbook Air
- <细节>动态创建二维数组
- 01背包问题【动态规划】
- Knickknacks cocos2d 使用中的一些琐碎技术点
- 八大排序算法学习笔记:冒泡排序
- 32位Cortex-M0微控制器——LPC1200 系列ARM
- 如何使Qt平台中GUI保持响应流畅