Take the 2-minute tour ×  I'm trying to make a struct that
contains another struct with multiple arrays. I need to
dynamically allocate those arrays too, so I think I need another
pointer still.  int arraysize;  typedef struct Array{ int *size
= arraysize; unsigned int val[*size]; unsigned int x[*size];
unsigned int y[*size]; } Array;  typedef struct Image{ int
height; int width; int max; Array *data; } Image;  OK, so once I
finally figure that out, I still need to figure out how to
dynamically allocate that memory using malloc. I'm totally lost
there too. Any help at all would be greatly appreciated.  EDIT:
more clarification: I'm using the arrays to store three pieces
of information that are all connected. Think of a chessboard,
you could say knight E4, which tells you that on the 4th column
of row E, there is a knight. If you started this process at A1
and ended at K10 you'd have a full chessboard right? The image
struct is analogous to the chessboard, the Array is analogous to
a list of a bunch of squares