#include <stdio.h>
#include <process.h>void thread(void *)
{
printf("%s","ok!");}int main()
{
_beginthead(thread,0,NULL);
return 0;}为什么这个程序执行后,屏幕上没有任何显示,直接就结束了?
#include <process.h>void thread(void *)
{
printf("%s","ok!");}int main()
{
_beginthead(thread,0,NULL);
return 0;}为什么这个程序执行后,屏幕上没有任何显示,直接就结束了?
之后需要 WaitForSingleObject等子线程结束。