Hi, I have been trying to use a struct to hold some const chars that represent a fixed date
The idea is to select a date on a Month Calendar and compare it to the fixed date in the struct so that a MessageBox can show
typedef struct BASEFULL
{
char const* bYear(){return "2010";}
char const* bMonth(){return "October";}
char const* bLongDay(){return "Saturday";}
char const* bDay(){return "23";}
} *PBASEFULL;
This is where the comparison is:
SYSTEMTIME chk[2];
BASEFULL mch;
MonthCal_GetSelRange(hWndMonthCal, chk);
char buf3[30];
GetDateFormat(NULL, DATE_LONGDATE, &chk[0], NULL, buf3, 30);
char buf[100];
strcpy(buf, buf3);
strcat(buf, " = ");
strcat(buf, mch.bLongDay());
strcat(buf, ", ");
strcat(buf, mch.bDay());
strcat(buf, " ");
strcat(buf, mch.bMonth());
strcat(buf, " ");
strcat(buf, mch.bYear());
if(mch.bLongDay() == chk[0].wDayOfWeek)
{
MessageBox(hwndDlg, buf, "MATCH!", 0);
}
The comparison has an error: "forbidden comparison between pointer and integer"
If I comment out the "if", the message shows correctly. How can I set the comparison up correctly?
Please forgive me if I am being confusing but I am a newbie in win32 and c++
Please help me figure things out with this error.