Link to home
Start Free TrialLog in
Avatar of perlperl
perlperl

asked on

structure interpret

typedef struct {
	u_int len;
	uint32_t *val;
} bits;

bits b*_obj;
b_obj->val[0];
b_obj->val[1];

Open in new window


Can someone please give me an example with some values. I am confused why it is using [] operator on pointer to uint32_t
ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of perlperl
perlperl

ASKER

hmmm. so if the len = 3, I can also access b_obj->val[2]  Correct?
Yes, absolutely.
Thanks!