q***z 发帖数: 934 | 2 Here is my program
the head is
typedef struct struct_CN
{
unsigned char magicA;
unsigned char magicB;
unsigned short msgLen;
} CN;
typedef struct struct_CcDev
{
CN Header;
unsigned short action;
} CcDev;
CcDev CcDev_packet;
Evaluate_CN(CN *CN_p)
{
strcpy(&CN_p->magicA,"A");
printf("magicA is %s\n", &CN_p->magicA);
strcpy(&CN_p->magicB,"H");
printf("magicB is %s\n", &CN_p->magicB);
CN_p->msgLen = 1234;
printf("msgLen is %d\n", &CN_p->msgLen);
}
void |
|