pls h have problems whit condition of if ()

//my code
if ( date.year <2000)
{
int i=1900;
if ((date.day ==29 && date.month ==2) && !((date.year −i)/4==0))return false;

}
if ( date.year >2000)
{
int i=2000;
if ((date.day ==29 && date.month ==2) && !(((date.year −i)/4)==0)) return false;

}
//errors
//------------------------------------
error C2146: syntax error : missing ')' before identifier '−i'
error C2146: syntax error : missing ')' before identifier '−i'
//-------------------------------------

Thanks.
I think your '−' is not the right '-' character
thanks
(date.year-i)/4==0

This will return true when (date.year-i) is 1,2,3 (and -1,-2,-3), and false in all other cases.

(date.year)%4==0

This makes more sense. Should it be this?
Last edited on
I know ,I changed it trying to fix the problem
but 10x any way
Topic archived. No new replies allowed.