• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            r2100

              C++博客 :: 首頁 :: 聯(lián)系 :: 聚合  :: 管理
              8 Posts :: 9 Stories :: 2 Comments :: 0 Trackbacks

            常用鏈接

            留言簿(3)

            我參與的團(tuán)隊(duì)

            搜索

            •  

            最新評(píng)論

            閱讀排行榜

            評(píng)論排行榜

             1 // boost.cpp : 定義控制臺(tái)應(yīng)用程序的入口點(diǎn)。
             2 //
             3 
             4 #include "stdafx.h"
             5 
             6 #include <iostream>  
             7 #include <boost/thread/thread.hpp>  
             8 #include <boost/bind.hpp>
             9 #include <boost/function.hpp>
            10 void hello(int i, int j)  
            11 {  
            12     std::cout << "Hello world, I'm a thread!" << std::endl;  
            13     std::cout<< i+j << std::endl;
            14 }  
            15 
            16 class A
            17 {
            18 public:
            19     void hello(int i, int j){
            20         std::cout<<i+j<<std::endl;
            21     }
            22 };
            23 
            24 int _tmain(int argc, _TCHAR* argv[])
            25 {
            26     //boost::thread thrd(&hello);  
            27     //thrd.join(); 
            28 // bind
            29 //     A a;
            30 //     boost::bind(&A::hello, a, 1, 2)(1,2);
            31 //     boost::function<void(int,int)> f;
            32 
            33 // function
            34 //     boost::function<void(int,int)> f;
            35 //     f = hello;
            36 //     f(1,2);
            37 
            38     A a;
            39     boost::function<void(A,intint)> cf;
            40     cf=&A::hello;
            41     cf(a,1,2);
            42 
            43 // bind & function    
            44 //     boost::function<void(int,int)> f;
            45 //     f=boost::bind(hello,_1,_2);
            46 //     f(1,1);
            47 // 
            48 //     A a;
            49 //     boost::function<void(int, int)> cf;
            50 //     cf=boost::bind(&A::hello,a,_1,_2);
            51 //     cf(1,1);
            52 // 
            53 //     boost::function<>
            54 
            55     return 0;
            56 }
            57 
            posted on 2015-06-28 23:25 r2100 閱讀(116) 評(píng)論(0)  編輯 收藏 引用 所屬分類: C++

            只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。
            網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


            青青草原综合久久大伊人| 精品综合久久久久久97超人| 亚洲综合久久夜AV | 伊人久久大香线蕉亚洲| 久久这里只精品国产99热| 久久婷婷午色综合夜啪| 久久se精品一区二区| 久久精品国产亚洲AV影院| 国产精品美女久久久| 久久久久久久久久久久久久| 精品国产91久久久久久久a| 77777亚洲午夜久久多喷| 久久男人AV资源网站| 日韩精品国产自在久久现线拍| 久久婷婷色综合一区二区| 精品久久久久久无码中文字幕| 久久夜色精品国产欧美乱| 亚洲欧美日韩久久精品| 91久久九九无码成人网站| 久久久久亚洲av无码专区 | 色99久久久久高潮综合影院| 久久亚洲私人国产精品vA| 精品久久久久久国产| 久久久久久久综合狠狠综合| 久久免费国产精品| 性高朝久久久久久久久久| 久久精品国产一区二区| 久久综合狠狠综合久久激情 | 97r久久精品国产99国产精| 色综合久久无码中文字幕| 免费精品久久天干天干| 久久久久亚洲AV成人网人人网站 | 亚洲国产精品综合久久一线| 久久免费视频一区| 久久强奷乱码老熟女网站| 国产精品久久久久久五月尺| 中文字幕无码久久人妻| 久久久久亚洲AV无码观看| 国产综合久久久久久鬼色| 国产精品一区二区久久精品| 成人精品一区二区久久 |