Skip to content

Commit 30bbe9c

Browse files
fdrvrtmegonSchiele
authored andcommitted
Fix the variable typo and add the function call (#109)
1 parent 0377eab commit 30bbe9c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Diff for: 03_recursion/c++11/02_greet.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ void greet(std::string name) {
1717
cout << "Hello, " + name + "!" << endl;
1818
greet2(name);
1919
cout << "Getting ready to say bye..." << endl;
20+
bye();
2021
}
2122

2223

Diff for: 04_quicksort/c++11/02_recursive_sum.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ T sum(std::vector<T> arr) {
1010

1111
T last_num = arr.back(); // save last number value
1212
arr.pop_back(); // and remove it from array for next recursive call
13-
return first_num + sum(arr);
13+
return last_num + sum(arr);
1414
}
1515

1616
int main() {

0 commit comments

Comments
 (0)