Thank you Ideswa. That worked a charm.
But I have another question:
Code:
//============================================================================
// 631_WinTest Code.
// Copyright 2001-2004, Crystalfontz America, Inc. Written by Brent A. Crosby
//
// You may use this code in any project (including commercial) as long as
// at least one of the intents of the project is to communicate with a
// Crystalfontz display.
//
// http://www.crystalfontz.com [email protected]
//============================================================================
typedef unsigned char ubyte;
typedef signed char sbyte;
typedef unsigned short word;
typedef unsigned long dword;
typedef union
{
ubyte
as_bytes[2];
word
as_word;
} WORD_UNION;
typedef struct
{
ubyte
command;
ubyte
data_length;
ubyte
data[MAX_DATA_LENGTH];
WORD_UNION
CRC;
}COMMAND_PACKET;
I want to be able to write:
Code:
COMMAND_PACKET *packet;
packet->CRC->as_word = //return of some function
but it will not compile?
Do you know how to fix this?