I need to read text file from asset folder in android, by searching through internet I found that there is asset_manager api available from android 2.3 onwards. As I am targ
Practically FILE* and 'int' descriptors are equivalent and fread/fwrite/fopen/fclose are the counterparts of open/close/read/write functions (the functions are not equivalent however, the latter are non-blocking).
To get 'int' from 'FILE*' you can use
int fileno(FILE* f);
in header and to do the inverse you can use fdopen()
FILE *fdopen(int fd, const char *mode);
So either replace everything using the FILE* to int or just take one of the samples and insert this conversion code before the file reading.