码迷,mamicode.com
首页 > 其他好文 > 详细

buhui

时间:2014-11-21 12:11:32      阅读:161      评论:0      收藏:0      [点我收藏+]

标签:io   ar   os   sp   bs   ad   amp   nbsp   window   

#include"stdafx.h"
#include<windows.h>
#include<process.h>
#include<iostream>
using namespace std;
void ThreadFunc1(PVOID param)
{
 int *p=(int *)param;
 cout<<"参数为:"<<*p<<endl;
  Sleep(1111);
  cout<<"这是第一个县城"<<endl<<endl;
 
}
void ThreadFunc2(PVOID param)
{
 cout<<"参数为:"<<(int)param<<endl;
 
  Sleep(1111);
  cout<<"这是第二个县城"<<endl<<endl;
 
}
int _tmain(int argc,_TCHAR* argv[])
{
 int i=2222222;
 _beginthread(ThreadFunc1,0,&i);
 //_beginthread(ThreadFunc2,0,&23);
 Sleep(13110);
 cout<<"end"<<endl;
 return 0;
}

buhui

标签:io   ar   os   sp   bs   ad   amp   nbsp   window   

原文地址:http://www.cnblogs.com/zhangdashuai/p/4112388.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!