C++线程小例子

 
#include <vector>
#include <boost/progress.hpp>
#include <boost/thread.hpp>
#include <Windows.h>
#include <map>
#include <sstream>
#include <iostream>
 
#include <hash_map>
 
#include "CSHOW.H"
using namespace boost;
using namespace std;
 
 
void PutDatas(int nData, float fPrice)
{
	while(true)
	{
		Sleep(1000);
		cout << "我是中国人" ;
	}
}
 
int main()
{
 
	 boost::thread(PutDatas, 100, 132.1f);
	
	
	int wait;
	cin >> wait;
}
 
 
 
posted @ 2013-06-28 21:20  Predator  阅读(179)  评论(0编辑  收藏  举报