this library helps you for using Local File System
Diff: lfs_useful.h
- Revision:
- 5:6e1bb72b0905
- Parent:
- 4:740a21177ed7
- Child:
- 6:dbe54101d32f
diff -r 740a21177ed7 -r 6e1bb72b0905 lfs_useful.h --- a/lfs_useful.h Fri Apr 17 07:11:44 2015 +0000 +++ b/lfs_useful.h Fri Apr 17 07:15:08 2015 +0000 @@ -1,6 +1,14 @@ #ifndef _LFS_USEFUR_H_20150417_1537_ #define _LFS_USEFUR_H_20150417_1537_ -void read_some(FILE *f,double *ar,int num); +/** read_some function : + * @bref read some member of csv format document in local file and write in arrangement + * @param f write FILE *(name) 's name + * @param ar arrangement which you want to get data + * @param num the number of elements you want to get + */ +void read_some(FILE *f,double *ar,int num){ + for(int i=0; i<num; i++)fscanf(f,"%lf,",&ar[i]); +} #endif \ No newline at end of file