I tired the solution posted by ANCIENT DRAGON. It is not working too....:
Post your code. fgets() has been working perfectly on all platforms for over 20 years. Its your code that is wrong, not that function.
Take a look at this function:
int *getline( char *string, size_t size ) { <snip> return string; }
Why does that function say its return int * when it is in fact returning char * ?