c++ - Create Multiple Queues at Once -


is there way can create multiple queues @ once?

for example program ask. how many queues user wants, if submits 3 create 3 queues this.

queue<int> queue1;  queue<int> queue2;  queue<int> queue3; 

do create loop this? or there way so?

for (int = 0; i<userinput; i++) {    queue<int> queue[i]; } 

would above work? ask user how many queues want created, , create them based on input.

vector<queue<int>> queues(n); 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -