#ifndef _TT_H_
#define _TT_H_#include <windows.h>typedef void (*pp)();class Test
{
public:
Test(int num)// : n(num)
{
g_hEvent = CreateEvent(NULL, true, false, NULL);
InitializeCriticalSection(&g_cs); for(int i = 0; i < num; ++i)
{
ThreadItem *item = new ThreadItem();
item->_this = this;
item->i = i;
CreateThread(0, 0, te, (LPVOID)item, 0, 0);   //创建了四个线程
}
} void call(pp a)
{
printf("call\n");
SetEvent(g_hEvent);
} static int cnt;
static HANDLE g_hEvent;private: static DWORD WINAPI te(LPVOID lp)
{
while(true)
{
WaitForSingleObject(g_hEvent, INFINITE);
ThreadItem *item = (ThreadItem *)lp;
Test *t = item->_this;
EnterCriticalSection(&(t->g_cs)); //仅有一个线程进入临界区 
printf("%d : %d : aaa\n", item->i, cnt);//如果删除临界区折几个线程轮番输出
if(--cnt < 0)
break;
LeaveCriticalSection(&(t->g_cs));
} return 0;
} struct ThreadItem
{
HANDLE hEvent;
int i;
pp p;
Test *_this;
}; int n;
HANDLE hEvent;
ThreadItem *item;
CRITICAL_SECTION g_cs;
};#endif
#include <iostream>
#include <stdio.h>
#include "tt.h"
#include "threadpool.h"#include <Windows.h>using namespace std;class Test;int Test::cnt = 100;
HANDLE Test::g_hEvent = NULL;int main()
{
Test t(4);
// Sleep(1000);
int a = 0;
cin >> a;
t.call(print);// ThreadPool a(2);
// a.Call(print); Sleep(20000);
return 0;
}问题在注释内 望给我给出答案