Ok thx.
So then for any pointer in a struct I need to allocate memory for?

So if my struct contained a int* pointer.
Would the int it's pointing at need to be allocated as well?
so malloc(sizeOf(int))

Also I'll look into the casting issue and ask my teacher about it.