error C2371: 'DATE' : redefinition; different basic types

class DATE

{
public:
void extend_date(int,int,int,int );
int diff(int, int, int, int, int, int);
int day,mon,year;

};



void DATE ::extend_date(int d1, int m1, int y1, int days)
{
............................ }

int DATE :: diff(int d1, int m1, int y1, int d2, int m2, int y2)
{
.........................
}
**I have an error is Class DATE .. Redefinition; different basic type anyone please help me . Thank you
Could DATE be already defined somewhere else? In a system header file, perhaps?

Try renaming your class to something more likely to be unique (e.g. zakk_DATE) and see if the problem persists.
Last edited on
Conventionally, names in ALL_CAPS are preprocessor macros. Maybe you should check the preprocessed output of your compiler -- this could help to diagnose in the case there is a macro collision. For GCC-compatible compilers, the flag is -E.
Topic archived. No new replies allowed.