Originally posted by insomniak
I'm writing a program that draws a calendar for the month based on info taken from the system clock. In the global declarations I have the following line which always gets a warning when compiled
const int monthdays[12] = {"31", "28", "31", "30", "31", "30", "31", "31", "30", "31", "30", "31"};
the warning I keep getting is
'initializing' : 'const int ' differs in levels of indirection from 'char [3]'
I don't understand why?!? isn't this just like declaring and initializing an array?
can someone explain.
Thanks
try
Code:
const int monthdays[12] = {31, 28,31, 30, 31, 30, 31, 31,30, 31, 30, 31};