Does the copy constructor and copy assignment operator not work for stl containers such as stack and queue;
i tried it on Dev C++ 5.11
Copy constructor for STL
Hey Shanu, both the copy constructor and copy assignment operator works for STL containers such as stack and queue for C++11 or higher versions (not sure about c++98 ).
I tried to do it but it is not working
Problem is with your while loop for printing the stack in which you are popping from stack s1 and have written the while loop’s condition for stack s
1 Like