blob: 7909b6b3aaa3f4d294b6831486fff40208652f3e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include "vector.hpp"
#include <iostream>
int main()
{
ft::vector<int> vec(10);
ft::vector<int> other(vec);
vec = other;
other.assign(ft::vector<int>::size_type(5), 3);
for (ft::vector<int>::size_type i = 0; i < other.size(); i++)
std::cout << other.at(i) << std::endl;
std::cout << std::endl;
other.push_back(6);
other.push_back(8);
for (ft::vector<int>::size_type i = 0; i < other.size(); i++)
std::cout << other.at(i) << std::endl;
std::cout << std::endl;
other.pop_back();
for (ft::vector<int>::size_type i = 0; i < other.size(); i++)
std::cout << other.at(i) << std::endl;
return 0;
}
|