When I read pg.176 of The C programming Language by K&R, I was very excited. I found all the members of struct FILE ( which I was searching for ) and its just awesome to know how things work. But guess what, gcc complains, error: ‘FILE’ has no member named ‘fd’. It means things have changed now, I googled but could not find. Please Help, Thank you in advance.
I can use fileno() to get the file descriptor, but I hate working on abstraction level.
int
main ( int argc, char **argv ){
FILE *fp = fopen ("ct.c", "r");
printf ("%i", fp->fd);
return 0;
}