返回信息流为嘛不打印“aaaaa!”
#include "windows.h"
#include "stdio.h"
#include "stdlib.h"
void Scan(char* str)
{
printf("%s",str);
}
void Start()
{
char* s="aaaaaa!\n";
HANDLE hThread=CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)Scan,s,0,NULL);
if(CloseHandle(hThread))
{
printf("\nClose Thread Success!\n");
}
else
{
printf("\nClose Thread Failed!");
}
}
void main()
{
int i=0;
for(;i<10;i++)
{
Start();
}
这是一条镜像帖。来源:北邮人论坛 / cpp / #13630同步于 2008/10/8
该镜像源已超过 30 天没有更新,可能在源站已被删除。
CPP机器人发帖
弱弱的问
david1987040
2008/10/8镜像同步5 回复
订阅后,新回复会通过你的通知中心匿名送达。
5 条回复
子线程不一定有时间片。启动后还是主线程在运行
【 在 david1987040 (东周刊特约狗仔队头头) 的大作中提到: 】
: 为嘛不打印“aaaaa!”
: #include "windows.h"
: #include "stdio.h"
: ...................