Skip to content

Commit

Permalink
improving ex3_19.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Mooophy authored and pezy committed Jun 21, 2015
1 parent a1157ac commit 2ee9cf1
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions ch03/ex3_19.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@ using std::vector;

int main()
{
vector<int> ivec1(10, 42);
vector<int> ivec2{42, 42, 42, 42, 42, 42, 42, 42, 42, 42};
vector<int> ivec3;
for (int i=0; i != 10; ++i)
ivec3.push_back(42);

std::cout << "The first one more better!" << std::endl;

return 0;
vector<int> ivec1(10, 42);
vector<int> ivec2{42, 42, 42, 42, 42, 42, 42, 42, 42, 42};
vector<int> ivec3;
for (int i=0; i != 10; ++i)
ivec3.push_back(42);
std::cout << "The first approach is better!" << std::endl;
}

0 comments on commit 2ee9cf1

Please sign in to comment.