i started learning c,i know malloc is for dynamic allocation but i dont know how to use with structure,using the image1 parameters i have to allocate space in memory
//it showing error "incompatible types when assigning ------
Code:typedef struct { height; width; depth; }VALUES; VALUES image1,image2; image2 = (char*)malloc (image1.height,image1.width,image1.depth(sizeof(char));//how to write this code (image 2 is of type structure)