BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Array of TThread

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Internet)
View previous topic :: View next topic  
Author Message
carmelo
Guest





PostPosted: Tue Oct 11, 2005 5:30 pm    Post subject: Array of TThread Reply with quote



Hello eveybody,
I'm trying to make an array of TThread objects.
1) I used this code to create the array:
ThreadEX *VettCercaEmail1 = new ThreadEX[maxThreads];
2) I created a constructor with no parameters, to make possible to
create the array:
__fastcall ThreadEX::ThreadEX() : TThread(true)

I get no compiler error, but I get a crash on runtime:
"Access violation at address 00000000. Read of address 00000000"

How can I do??

I hope you can help me

Thank you very much in advance Smile
Back to top
Pierreq
Guest





PostPosted: Sat Oct 22, 2005 3:17 pm    Post subject: Re: Array of TThread Reply with quote



Hello.
I think U should use TList Component instead.
ThreadEX *VettCercaEmail1 = new ThreadEX();
and in ThreadEX() creator do TList1->Add(this);
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Internet) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.