六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 100|回复: 0

windows下C语言多线程编程

[复制链接]

升级  40%

96

主题

96

主题

96

主题

举人

Rank: 3Rank: 3

积分
320
 楼主| 发表于 2013-2-7 03:40:10 | 显示全部楼层 |阅读模式
 
_beginThreadex创建多线程解读

一、需要的头文件支持

 #include <process.h>         // for _beginthread()
需要的设置:ProjectàSetting-->C/C++-->User run-time library 选择Debug Multithreaded 或者Multithreaded。即使用: MT或MTD。
源码如下:
 
<div style="font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-color: #e7e5dc; width: 687.0499877929688px; overflow: auto; padding-top: 1px; color: #333333; line-height: 26px; margin: 18px 0px !important;" class="dp-highlighter bg_cpp"><div style="padding-left: 45px;" class="bar"><div style="padding: 3px 8px 10px 10px; font-size: 9px; line-height: normal; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: silver; background-color: #f8f8f8; border-left-width: 3px; border-left-style: solid; border-left-color: #6ce26c;" class="tools">[cpp] view plaincopy<div style="width: 18px; height: 18px;">
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表