Hi
im writing a program for a user calender operation
i keep getting dis error and i cant figure how to fix it
Code:
error C2371: 'day_of_the_week_month_of_year' : redefinition; different basic types
here where the prolem is
Code:
void view_events(struct evnt* head)
{
struct evnt* nod;
for(nod=head; nod!=NULL; nod=nod->next)
{
day_of_the_week_month_of_year(nod->day,nod->month,nod->year);
printf("\nStart Time: %d\nEnd Time:%d\nEvent description:%s\n",nod->begin_time,nod->end_time,nod->event_details);
printf("\n\n");
}
}
and this is the function
Code:
void day_of_the_week_month_of_year(int day,int month,int year)
{
int a,m,y,date=0;
checking_date(day,month,year);
a=((14-month)/12);
y=(year-a);
m=(month+(12*a)-2);
date=((date+y+(y/4)-(y/100)+(y/400)+(31*m/12))%7);
if(date==0)
printf("\nSunday");
if(date==1)
printf("\nonday");
if(date==2)
printf("\nTuesday");
if(date==3)
printf("\nWednesday");
if(date==4)
printf("\nThursday");
if(date==5)
printf("\nFriday");
if(date==6)
printf("\nSaturday");
printf(" %d ",day);
if(month==1)
printf("January");
if(month==2)
printf("Febuary");
if(month==3)
printf("March");
if(month==4)
printf("April");
if(month==5)
printf("May");
if(month==6)
printf("June");
if(month==7)
printf("July");
if(month==8)
printf("August");
if(month==9)
printf("September");
if(month==10)
printf("October");
if(month==11)
printf("November");
if(month==12)
printf("December");
printf(" %d",year);
}
doesnt any one know how to fix dis error
thanks