queue stl Question 7

Last Updated :
Discuss
Comments

Which of the following is not a valid way to initialize a queue in C++?

queue<int> q;

queue<int> q(5);

queue<int> q({1, 2, 3});

queue<int> q(q2);

Share your thoughts in the comments