zoukankan      html  css  js  c++  java
  • buhui

    #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;
    }

  • 相关阅读:
    LeetCode 260
    LeetCode 258
    LeetCode 237
    LeetCode 226
    LeetCode 203
    LeetCode 202
    codeforces 7D
    codefroces 7C
    codeforces 7B
    codeforces 6E (非原创)
  • 原文地址:https://www.cnblogs.com/zhangdashuai/p/4112388.html
Copyright © 2011-2022 走看看