40 lines
1.4 KiB
C++
40 lines
1.4 KiB
C++
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* main.cpp :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2026/04/21 11:31:38 by aortigos #+# #+# */
|
|
/* Updated: 2026/04/21 12:00:20 by aortigos ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "MutantStack/MutantStack.hpp"
|
|
|
|
int main()
|
|
{
|
|
MutantStack<int> 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<int>::iterator it = mstack.begin();
|
|
MutantStack<int>::iterator ite = mstack.end();
|
|
++it;
|
|
--it;
|
|
while (it != ite)
|
|
{
|
|
std::cout << *it << std::endl;
|
|
++it;
|
|
}
|
|
std::stack<int> s(mstack);
|
|
|
|
return (0);
|
|
} |