Source of TestStuff20160203.cpp


  1: //TestStuff20160203.cpp

  3: #include <iostream>
  4: #include <string>
  5: #include <vector>
  6: using namespace std;

  8: int main(int argc, char* argv[])
  9: {
 10:     //int a[] = { 2, 4, 6, 8, 10, 12 };
 11:     //vector<int> v4(a, a + sizeof(a) / sizeof(int));
 12:     //cout << "\nContents of v4: ";
 13:     //for (vector<int>::size_type i = 0; i<v4.size(); i++)
 14:     //cout << v4[i] << " ";
 15:     //cout << "\nPress Enter to continue ... ";  cin.ignore(80, '\n');

 17:     vector<int> v4{ 2, 4, 6, 8, 10, 12 };
 18:     cout << "\nContents of v4: ";
 19:     for (int i : v4) cout << i << " ";
 20:     cout << "\nPress Enter to continue ... ";  cin.ignore(80, '\n');
 21: }