mercredi 14 juillet 2021

check a timepoint exist in a periode of time

I have two std::tm time. In my program the user input string date and I convert them to std::tm

std::tm start_time;
std::tm end_time;

I have a third std::tm. This will input like two first time points.

std::tm question_time;

I want to check question_time is between start_time and end_time or not?;

there is a bad way to compare all necessary members of std::tm's struct. is there any better way in C++11?

I only can use C++11.

ty

Aucun commentaire:

Enregistrer un commentaire