Hint error in C++ Making the Grade exercise

In the hint for 1. Rounding Scores, it says:

  • <vector>.pop_back() will remove and return the last item in a vector.

This is not correct: cplusplus.com/reference/vector/vector/pop_back/. It returns nothing.

Perhaps something like this should be written instead:

  • <vector>.back() will return the last item in a vector.
  • <vector>.pop_back() will remove the last item in a vector.

I also tried to create a PR on GitHub: Update hints.md by Prin-S · Pull Request #710 · exercism/cpp (github.com).

Thank you for catching that!

1 Like