I'm trying to make a program which states the day of any date I use using Zeller's algorithm. I don't have the code with me right now. But when I try to write an if statement with an address and an or || operator, it doesn't compile. For example,
It gives an error for some reason saying that *month must be a modifiable variable. What could be wrong?Code:int getmonth (int *month, int *date) {scanf ("%d/%d", month, date); If ((*month==1 || *month == 2) && *date>=1 && *date<=31) return 1; else return 0;}



LinkBack URL
About LinkBacks


