Thread: c++ problem
View Single Post
Old 10-25-2004, 09:45 PM   #2 (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

Use an array of queues. That way you can just refer to them by their index. I haven't used C++ in a while, in C# you'd use an ArrayList (an array that can have a variable number of elements), so I'm not sure if C++ has something similar.

Just add a new "toll booth" to the array for every toll booth you need.
__________________

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

PM Me for my MSN
Iron_Cross is offline