引用传参的疑惑
#include "stdafx.h"#include <boost/thread/thread.hpp>#include <boost/bind.hpp>#include <iostream>#include <string>using namespace std;using namespace boost;void One_One(const int a,const int b,int &c){ c=a-b; cout<<c<<endl;}int main(){ int num=100;//初值 thread thrd1(bind(One_One,2,3,num)); thrd1.join(); cout<<num<<endl;//运行后输出了初值100 getchar(); return 0;}