View Single Post
Old Mar 22nd, 2008, 1:35 AM   #1
joeserhal
Newbie
 
Join Date: Feb 2008
Posts: 12
Rep Power: 0 joeserhal is on a distinguished road
How to name queues using a "for" loop??

Hi there,
I'm facing some trouble with creating and naming queues in C language.
I need to create five queues using a "for" loop, and with each iteration of the "for" loop, a created queue will be given a name depending on the index of the iteration. It should look like something like this:

for(i=0;i<5;i++)
{
q(i) = CreateQueue(size 2);
}

At the first iteration, I should get a queue called q0 or something, then q1....

I need this because, at a later stage in my program, i need to access,through a "for" loop, a particular queue depending on the index of the iteration.

Does anybody know how i can do this??....
Thanks
joeserhal is offline   Reply With Quote