dxrose86
Joined: 28 Feb 2009 Posts: 5 Location: Taunton Ma
|
Unions |
Posted: Wed Jan 20, 2010 4:48 pm |
|
|
Hello I am using CCS v4.099 on a PIC18f26k20 processor. I am trying to compile a simple program with a union, and am getting the error message below the union.
Code: |
union
{
int8 uByte[2];
int16 uWord;
} CRC16;
CRC16.uWord = 0xFFFF; // Initialise CRC to 0xFFFF
|
This error is on the assignment of CRC16.uWord.
Quote: |
Error 48 "p2.c" Line 61(3,8): Expecting a (
*** Error 48 "p2.c" Line 61(15,20): Expecting a (
*** Error 43 "p2.c" Line 61(17,23): Expecting a declaration
*** Error 43 "p2.c" Line 61(23,24): Expecting a declaration
|
This example was from a previous posting so I assume it compiled sometime.
Thanks _________________ Micro-guy |
|