Ah it's been a while since I coded. Anyway, I'm trying to do a program, and am curious as to why this doesn't work:
Code:
#define MONTH 9
#define DAY 17
#define YEAR 04
#include <stdio.h>
struct month
{
int number; //Cardinal number of the month
int days; //Number of days in the month
char *name; //Name of the month
};
typedef struct month month;
month months[11] = {
{1, 31, "January" },
{2, 28, "February"}
};
//months[0].number = 1;
//months[0].days = 31;
//months[0].name = "January";
int main()
{
return 0;
}
The part commented out anyway. It will not work.
Must this be done in main? Or what is going on?