View Single Post
Old Mar 23rd, 2008, 4:15 AM   #7
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Re: How to name queues using a "for" loop??

Goddamnit, should pay more attention to the forum title. Sorry about that. It seems to have helped a bit though, so not all is lost.

The same logic I used in my previous post applies. Enqueue will push ints (typedef'd to ElementType, but you don't really need to worry about that) to the queue specified, [icode]Dequeue will pull the frontmost element off the queue and return it. You also have two handy functions, IsEmpty and IsFull, which basically do what they say on the tin.

It's important to note that you need to use the DestroyQueue function on each queue after you've finished to free up the memory properly.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote