Hey everyone!
I have written my own kind-of-custom-version of the stack container in the STL. The iterators seem to be working and the basic push/pop/size I did.
Now there is one thing that doesnt seem to work, and I have no idea how to start:
Code:
std::stack<int> s(mstack);
It declares the real version of the stack, with my version of the stack as a parameter. The error I get is:
Code:
main.cpp:34: error: no matching function for call to `std::stack<int, std::deque<int, std::allocator<int> > >::stack(MutantStack<int>&)'
/usr/include/c++/3.4/bits/stl_stack.h:111: note: candidates are: std::stack<int, std::deque<int, std::allocator<int> > >::stack(const std::stack<int, std::deque<int, std::allocator<int> > >&)
/usr/include/c++/3.4/bits/stl_stack.h:144: note: std::stack<_Tp, _Sequence>::stack(const _Sequence&) [with _Tp = int, _Sequence = std::deque<int, std::allocator<int> >]
Im not sure where to start to make it work with the real stack.
Thank you for any tips!