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
Post a Comment