What about the method I used? How would I fill it with the numbers? Or is that not possible because of the pointer?
E:
Your method is still producing errors, or is it just the way I did it?
1 2 3 4 5 6 7 8 9
struct Year
{
int pattern[12];
int num;
};
Year* leap = new Year;
leap->pattern = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
leap->num = 366;
In function ‘int main()’:
NumSunday.cc:18:66: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x [enabled by default]
NumSunday.cc:18:66: error: assigning to an array from an initializer list