Problem with naming queues

Discussion in 'C' started by joeserhal, Mar 22, 2008.

  1. joeserhal

    joeserhal New Member

    Joined:
    Feb 13, 2008
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    0
    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
     
  2. lead.smart34

    lead.smart34 New Member

    Joined:
    Feb 14, 2008
    Messages:
    77
    Likes Received:
    0
    Trophy Points:
    0
    i feel whatever you did is fine
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice