Exemplo n.º 1
0
int main(){
    
    MyVector<string> vec;
    vec.push_back("CS14");
    vec.push_back("World");
    vec.insert("Hello", 0); 
    cout << vec.front() << endl; // "Hello"
    cout << vec.back() << endl; // "World"
    vec.pop_back();
    cout << vec.back() << endl; // "CS14"
    vec.pop_back();
    cout << vec.back() << endl; // "Hello"
    
    MyVector<int> another_vec;
    another_vec.push_back(42);
    cout << another_vec.front() << endl; //42
    
    return 0;
}