|
안녕하세요?
여기에서 많은 도움을 얻어가는 사람입니다...
오늘도 하나의 질문을 드리고자 몇자 적습니다.
Tip'N Tricks에 있는 쓰레드 예제 있잖아요...
그건 한개의 쓰레드만 생성시키는 건데 두개이상 생성하려면 어떻게 해야 하는지요
제가 초보라 하나를 가르켜주면 하나 밖에 몰라요--;
그럼 부탁 드립니다...
참고로 소스는 아래와 같습니다.
// unit2.h
//---------------------------------------------------------------------------
#ifndef Unit2H
#define Unit2H
//---------------------------------------------------------------------------
#include <Classes.hpp>
//---------------------------------------------------------------------------
class my : public TThread
{
private:
protected:
void __fastcall Execute();
public:
__fastcall my(bool CreateSuspended);
};
//---------------------------------------------------------------------------
#endif
// unit2.cpp
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit2.h"
#pragma package(smart_init)
//---------------------------------------------------------------------------
__fastcall my::my(bool CreateSuspended) : TThread(CreateSuspended)
{
}
//---------------------------------------------------------------------------
void __fastcall my::Execute()
{
//---- Place thread code here ----
}
//---------------------------------------------------------------------------
|