如果只是检验某一年是否是闰年的话,我有个简单的办法:你直接调用bool checkdate ( int month, int day, int year)函数来判断这一年的2月29是否合法,合法则是闰年,不合法则不是闰年。