Untitled

mail@pastecode.io avatar
unknown
plain_text
5 months ago
657 B
1
Indexable
// Online C++ compiler to run C++ program online
#include <iostream>
#include <vector>
using namespace std;
int main() {
     vector<int> numbers;
     cout<<"Madhesia fillestare e vektorit eshte "<<numbers.size()<<endl;
     cout<<"Kapaciteti fillestar i vektorit eshte "<<numbers.capacity()<<endl;
     numbers.push_back(10);
     numbers.push_back(7);
     numbers.push_back(1);
     numbers.push_back(23);
     numbers.push_back(30);
     numbers.pop_back();
     numbers.pop_back();
     numbers.push_back(65);
     numbers.reserve(20);
     numbers.insert(numbers.begin()+3,70);
     for(int i : numbers){
         cout<<i<<" ";
     }
    return 0;
}
Leave a Comment