Hi,
In the following program, the structure "Root" is defined globally. Pointer to this structure gives compilation error.
The compilation error is:Code:#include<stdio.h> typedef struct { int a; float f; }Root; int main() { Root *root, root_h; root_h.a=1; root_h.f=10.11; root = &root_h; printf("\n Values : \n root.a = %d \n root.f = %f \n", root_h->a, root_h->f); return 0; }
error: invalid type argument of ->''
How to resolve this error?