Hi there,
I am using a struct whose elements may be arrays. I would like though, for these arrays to be dynamically allocatable when I declare them in the main code; how is it supposed to be done?
I wrap my code here; it's very simple, however, please let me know if there are more information that you need
Thank you in advance,
Best
S.M.
Code:
typedef struct Mesh{
float x; //x-coord of Vertex
float y; //y-coord of Vertex
float z; //z-coord of Vertex
} typeMesh
main
{
typeMesh COORDS [SIZE TO BE ALLOCATED] //This is where I'd like to allocate this dynamically.
/* What I would like to obtain is the COORDS array to be of SIZE_n that will be obtained as the output of another function that will be called only later in the code.
;