Did you like how we did? Rate your experience!

4.5

satisfied

46 votes

How do you allocate memory for a struct as a member in another struct?

By allocating memory for the enclosing struct. This will automatically allocate the memory for the member structs.

100%
Loading, please wait...