Question : How to populate unused structure member?

typedef struct
{
  unsigned short number_of_channels;
 
  /* This member is unused.  How to populate it? */  
  unsigned int const * master_channel_id_ptr;

  unsigned int const *  slave_channel_id_ptr;
                                     
} id_group_t;


const  unsigned int     input_channels[] =
{
     1,            
     2,
     3,
};


const id_group_t       input_group =
{
     3,

     /* how to populate this unused member */

     input_channels,
};

Answer : How to populate unused structure member?

>> If so, then what you did for slave_channel_id_ptr can be done for master_channel_id_ptr.

Or you can just set it to NULL if it's unused.


Btw, I'm not sure whether the accepted posts answer your question. Did you try them out ? Did they do what you expected ?
Random Solutions  
 
programming4us programming4us