C++ 多线程问题
来源:百度知道 编辑:UC知道 时间:2024/06/08 01:13:06
#define WIN32_LEAN_AND_MEAN included correctly
#include <windows.h>
#include <windowsx.h>
#include <conio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
#include <math.h>
#include <io.h>
#include <fcntl.h>
// DEFINES ////////////////////////////////////////////////////////////////////////////////
// PROTOTYPES /////////////////////////////////////////////////////////////////////////////
DWORD WINAPI Printer_Thread(LPVOID data);
// GLOBALS ////////////////////////////////////////////////////////////////////////////////
// FUNCTIONS //////////////////////////////////////////////////////////////////////////////
DWORD WINAPI Printer_Thread(LPVOID data)
{
// this thread function simply prints out data 25 times with a slight delay
for (int index=0; index<25; index++