Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   Problem with naming queues (http://www.go4expert.com/forums/naming-queues-t9531/)

joeserhal 22Mar2008 10:05

Problem with naming queues
 
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:

Code:

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

lead.smart34 25Mar2008 15:26

Re: Problem with naming queues
 
i feel whatever you did is fine


All times are GMT +5.5. The time now is 23:47.