Thread: c++ problem
View Single Post
Old 10-25-2004, 10:39 PM   #4 (permalink)
Iron_Cross
 
Ultra Techie

Join Date: Sep 2003

Location: Bamberg, Germany

Posts: 549

Iron_Cross

Send a message via ICQ to Iron_Cross Send a message via MSN to Iron_Cross Send a message via Yahoo to Iron_Cross
Default

It's pretty simple. In C# (I know you're using C++, but i'm not too keen on that) You'd make the arraylist then just do something like:
Code:
ArrayList arrList = new ArrayList(10);
for(int i = 0; i < 10; i++){
arrList.Add(new Queue());
}
// then you'd access it like this
arrList[1].SomeMethod(); // do stuff with the second queue (since it's zero based)

arrList[4].SomeOtherMethod(); // do more stuff with the 5th queue
//etc
That's the basic idea.
__________________

See today\'s Penny-Arcade!(May contain foul lanuage)
Pain is weakness leaving the body.

PM Me for my MSN
Iron_Cross is offline