#include<stdio.h>
#include<string.h>
#include<malloc.h>
typedef struct male_node
{
int mv1,mv2,mv3;
}male;
typedef struct movie_name
{
char mvnm[20];
struct male *ml;
}movie;
main()
{
movie mov1;
mov1.ml=(male*)malloc(sizeof(male));
mov1.(*ml).mv1=1;//ERROR
mov1.ml->mv1=1; //ERROR
}
How to access the mv1 variable through mov1 and ml I tried to access mv1 through ml which is a pointer to a structure which is again a structure variable but it shows error.
intin front ofmainbut it hurts my heart when I see it is missing.