Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <vector>
- using namespace std;
- ///////////////////////////////////////////////////////
- int main() //
- {
- vector<int> v;
- printf("size of vector = %d \n", v.size());
- for(int i = 1; i < 10; i++)
- {
- v.push_back(i);
- }
- printf("size of vector = %d \n", v.size());
- v.pop_back();
- v.pop_back();
- printf("size of vector = %d \n", v.size());
- for(int i = 0; i < v.size(); i++)
- {
- printf("v[%d] = %d \n", i, v[i]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement