Skip to content

Commit 40d37dd

Browse files
authored
Merge pull request #378 from berquist/bogo-sort-cpp
Fix compilation error in bogosort C++
2 parents 87cabb1 + 3077da6 commit 40d37dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contents/bogo_sort/code/c++/bogosort.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ void print_range(std::ostream& os, Iter const first, Iter const last) {
2424

2525
if (first != last) {
2626
os << *first;
27-
std::for_each(first + 1, last, [&os] (double d) { os << ", " << *it; });
27+
std::for_each(first + 1, last, [&os] (double d) { os << ", " << d; });
2828
}
2929

3030
os << "}\n";

0 commit comments

Comments
 (0)