Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- cat > test.cpp <<DELIM
- #include <iostream>
- #include <vector>
- using namespace std;
- main()
- {
- cout << "start" << endl;
- vector<int> v1,v2,v3;
- for (int i=0;i<300;i++) {
- v1.push_back(i);
- v2.push_back(i);
- }
- v3.reserve(300*2);
- v3.clear();
- for (int i=0;i<300;i++) {
- v3.push_back(v1[i]);
- v3.push_back(v2[i]);
- }
- cout << "finish" << endl;
- return 0;
- }
- DELIM
- g++ test.cpp -o t;valgrind ./t
Advertisement
Add Comment
Please, Sign In to add comment