/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* main.cpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: narnaud +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/09/19 09:39:50 by narnaud #+# #+# */ /* Updated: 2022/09/19 09:40:01 by narnaud ### ########.fr */ /* */ /* ************************************************************************** */ #include "MutantStack.hpp" int main() { MutantStack mstack; mstack.push(5); mstack.push(17); std::cout << mstack.top() << std::endl; mstack.pop(); std::cout << mstack.size() << std::endl; mstack.push(3); mstack.push(5); mstack.push(737); //[...] mstack.push(0); MutantStack::iterator it = mstack.begin(); MutantStack::iterator ite = mstack.end(); ++it; --it; while (it != ite) { std::cout << *it << std::endl; ++it; } std::stack s(mstack); return 0; }