How to initialize the variable of a union having two arrays as parameter

0

I am new so please help me out. I am facing problem in initializing the variable of the given union:

typedef unsigned char uint8_t
typedef unsigned short uint16_t
typedef union uip_ip6addr_t
{
    uint8_t  u8[16];
    uint16_t u16[8];
} uip_ip6addr_t;

When I am doing

uip_ip6addr_t = {0xffffffff};

I am getting the error

error: expected identifier or ‘(’ before ‘=’ token

So please tell me how should I initialize this variable.

c
asked on Stack Overflow Nov 16, 2018 by Gray • edited Nov 17, 2018 by Gray

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0