Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
pezy committed Aug 6, 2015
1 parent 3c973aa commit b09ce93
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ch09/ex9_50.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
#include <string>
#include <vector>

int sum_for_int(const std::vector<std::string> const& v)
int sum_for_int(const std::vector<std::string> &v)
{
int sum = 0;
for (auto const& s : v) sum += std::stoi(s);
return sum;
}

float sum_for_float(const std::vector<std::string> const& v)
float sum_for_float(const std::vector<std::string> &v)
{
float sum = 0.0;
for (auto const& s : v) sum += std::stof(s);
Expand Down

0 comments on commit b09ce93

Please sign in to comment.