Start New Discussion within our Software Development Community

As per the code snippet:

typedef struct TimeSlotConfigurationList_LCR A {
	A_SEQUENCE_OF(struct B) list;
	asn_struct_ctx_t _asn_ctx;
} A_t;

#define A_SEQUENCE_OF(type) 
struct { 
type **array; 
int count; /* Meaningful size */ 
int size; /* Allocated size */ 
void (*free)(type *); 

typedef struct B {
	TimeslotNumber_LCR_r4_t	 x;
	ENUM{Yes(0), No(1)} y;
	ENUM{Ok(0), NotOk(1)} z;
	asn_struct_ctx_t _asn_ctx;
} B_t;

If I want to check on the value of ENUM type 'y' and then depending on the value proceed further, is how I have accessed y(below) correct??? If not, what am I doing wrong??

for (i=0; i<=6; i++)
          if( A_t.list.B->B->array[i].y == ACTIVE ){

Any insight would be appreciated...Thanks

ok..solved the problem..for any one else looking for accessing elements of a structure type whose object is declared as a double pointer I am posting with respect to the code above:

if (A.list->(*(array+i)).y== ACTIVE) { }

This question has already been answered. Start a new discussion instead.