mirror of
https://github.com/Ladebeze66/cpp-partie-2.git
synced 2025-12-16 14:07:54 +01:00
39 lines
1.4 KiB
C++
39 lines
1.4 KiB
C++
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* main.cpp :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2024/03/03 18:29:10 by fgras-ca #+# #+# */
|
|
/* Updated: 2024/03/03 18:30:06 by fgras-ca ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "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);
|
|
} |