- //文件名:CHAPTER6-19.cpp
- #pragma warning(disable:4786)
- #include <vector>
- using namespace std;
- void main (void)
- { vector<int> vector1;
- for (int i = 0; i < 10; ++i)
- vector1.push_back(i);
- vector1.insert(vector1.begin(), -1);
- vector1.insert(vector1.end(), 10);
- int IntArray[2] = {11,12};
- vector1.insert(vector1.end(), &IntArray[0], &IntArray[2]);
- }