unsigned char rtc_time[6] = { pThis->hoursTens, pThis->hoursUnits, pThis->minutesTens, pThis->minutesUnits, pThis->secondsTens, pThis->secondsUnits };
Does not compile. I receieve the error (6 times): constant expression required
Each of the variables are declared as an unsigned char. I have tried casting to (const) with no luck.
This is in MPLAB X IDE, C language, using Hi-Tech-PICC compiler v9.65PL1.
What is the problem?
It works when I define the variable as below, but I need to use the variables above.
unsigned char rtc_time[6] = { 0x1, 0x2, 0x3, 0x4, 0x5, 0x6 };