0

I'm new to ANSI-C and I'm trying to figure out how this works:

bd_t *bd = gd->bd; 

Is this telling me that bd_t = value of a structure value bd?

1 Answer 1

3

Somewhere, there is a typedef:

typedef something bd_t; 

The line:

bd_t *bd = gd->bd; 

declares a variable called bd as a pointer to a bd_t, and initializes it with the value of gd->bd from the pointer to structure variable gd. That structure contains a member bd that is presumably also a bd_t *.

From the single line, you can't tell anything more about the type bd_t.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.