CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2013
    Posts
    1

    loop each queue for a given n number of queue

    I have n number of queues (depends on the no. of threads ) and what i need is that, i want loop each of queue starting from from the 2nd queue to the nth (end) queue.

    how can i loop this?

    std::queue<int> queue;

    for(queue=queue+1; queue<=n; queue++) // will this idea loop from the 2nd to the nth (end) queue

    please check and let me know some ideas how to loop the queues

  2. #2
    Join Date
    Jul 2005
    Location
    Netherlands
    Posts
    2,042

    Re: loop each queue for a given n number of queue

    Quote Originally Posted by ishana View Post
    how can i loop this?
    Learn C++. Seriously, you don't know how to loop over a bunch of queues but you know how to use threads?
    Quote Originally Posted by ishana View Post
    std::queue<int> queue;
    This is one queue. Where are the other n-1 queues?
    Cheers, D Drmmr

    Please put [code][/code] tags around your code to preserve indentation and make it more readable.

    As long as man ascribes to himself what is merely a posibility, he will not work for the attainment of it. - P. D. Ouspensky

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured