i somehow can't find how to fix the error: "non portable pointer assignment in function main"
#define b break
#define p printf
#define s scanf
main()
{
char M,[9];
int month, day, year;
p("Enter Month:");
s("%d", &month);
p("Enter Day:");
s("%d", &day);
p("Enter Year:");
s("%d", &year);
switch(month)
{
case 1: M="January"; b;
case 3: M="March"; b;
case 5: M="May"; b;
case 7: M="July"; b;
case 8: M="August"; b;
case 10: M="October"; b;
case 12: M="December"; b;
}
if (day != 31)
p("Invalid Day");
switch(month)
{
case 4: M="April"; b;
case 6: M="June"; b;
case 9: M="September"; b;
case 11: M="November"; b;
}
if (day != 30)
p("Invalid Day");
if (month=2)
if (day != 28)
p("Invalid Day");
else
M="February";
if (month>12)
p("Invalid Date");
}
getch();
}