Skip to content

Commit

Permalink
Update ex3_41.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Mooophy committed Jun 20, 2015
1 parent 9edd0a7 commit 850f8b8
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions ch03/ex3_41.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
#include <iostream>
#include <vector>

using std::vector; using std::cout; using std::endl; using std::begin; using std::end;

int main()
{
int int_arr[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
vector<int> ivec(begin(int_arr), end(int_arr));
for (auto i : ivec) cout << i << " ";
cout << endl;
return 0;
int arr[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
vector<int> v(begin(arr), end(arr));

for (auto i : v) cout << i << " ";
cout << endl;

return 0;
}

0 comments on commit 850f8b8

Please sign in to comment.