小编use*_*194的帖子

如何比较一个程序中的两个日期?

所以,有两个日期,我必须检查是否date1远离date2.最好的方法是什么?

int date1_day = 21, date1_month = 1, date1_year = 1990;
int date2_day = 19, date2_month = 5, date2_year = 1989;

if(???)
{
   // date1 is further away
}
Run Code Online (Sandbox Code Playgroud)

几个小时我一直在努力争取这个.

c++ comparison console-application

0
推荐指数
2
解决办法
4880
查看次数

标签 统计

c++ ×1

comparison ×1

console-application ×1