40. Number of days between two dates

Write a function that, given two dates, returns the number of days between the two dates. The function should work regardless of the order of the input dates.

Get The Modern C++ Challenge now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.