Saturday 2 October 2021

Chapter 21 // Exercise 3 - Principles & Practice Using C++

In this exercise I am using Visual Studio 2019 and a modified version of the std_lib_facilities header found here.

Chapter 21 // Exercise 3

Implement count() yourself. Test it.


I originally returned a number however I then had a look at the actual implementation of std::count and used difference_type instead:
https://en.cppreference.com/w/cpp/algorithm/count

No comments:

Post a Comment