It tried what you suggested, but it doesn't work.
It still said the floating point doesn't linked for
scanf("%f", &rec[0]->mark);
but it works fine for
scanf("%s", &rec[0]->name);
This is so strange. Huh!...
User Profile
Collapse
-
Need helps on an array of pointers to structure
I have problems to access a member in an array of pointers to structure.
I declare the following structure
struct {
char name[80];
float mark;
}*rec[10];
I would like to put data to rec[0]. So I use following codes
gets(rec[0]->name);
scanf("%f", rec[0]->mark);
the gets command is working fine, But the command for rec[0]->mark...
No activity results to display
Show More
Leave a comment: