「✨」 feat: ex02...
This commit is contained in:
28
ex02/main.cpp
Normal file
28
ex02/main.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include "MutantStack.hpp"
|
||||
#include <iostream>
|
||||
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user