Once again, Xcode will not understand certain code syntax written on Windows. I'm trying to figure out why this is giving me an error. I do have the prototype declared in a header file:
The error says "overloaded operator must have at least one parameter of class or enumeration type." The error resides after I change the "int" to "DateType" (DateType is the class), but that doesn't really fix the issue. I have a function called AdvanceDays that I'm going to insert numDays into and that will increase the date by x number of days.
Why would this code work automatically on Windows and how can I get it to work on Mac? Sorry for such a noob question.
Code:
DateType operator+ (int numDays)
{
}
The error says "overloaded operator must have at least one parameter of class or enumeration type." The error resides after I change the "int" to "DateType" (DateType is the class), but that doesn't really fix the issue. I have a function called AdvanceDays that I'm going to insert numDays into and that will increase the date by x number of days.
Why would this code work automatically on Windows and how can I get it to work on Mac? Sorry for such a noob question.