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
Re: loop each queue for a given n number of queue
Quote:
Originally Posted by
ishana
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
std::queue<int> queue;
This is one queue. Where are the other n-1 queues?