this library helps you for using Local File System
lfs_useful.h@0:48f30ad8e377, 2015-04-17 (annotated)
- Committer:
- hirokimineshita
- Date:
- Fri Apr 17 06:50:49 2015 +0000
- Revision:
- 0:48f30ad8e377
- Child:
- 1:2ca69b58dae7
2015/04/17 PM 3 up : only read some data
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
hirokimineshita | 0:48f30ad8e377 | 1 | #ifndef _LFS_USEFUR_H_20150417_1537_ |
hirokimineshita | 0:48f30ad8e377 | 2 | #define _LFS_USEFUR_H_20150417_1537_ |
hirokimineshita | 0:48f30ad8e377 | 3 | /** |
hirokimineshita | 0:48f30ad8e377 | 4 | * @file this library is to be easy to use Local File System |
hirokimineshita | 0:48f30ad8e377 | 5 | */ |
hirokimineshita | 0:48f30ad8e377 | 6 | |
hirokimineshita | 0:48f30ad8e377 | 7 | /** read some member of csv format document in local file and write in arrangement |
hirokimineshita | 0:48f30ad8e377 | 8 | * @param f write FILE *(name) 's name |
hirokimineshita | 0:48f30ad8e377 | 9 | * @param ar arrangement which you want to get data |
hirokimineshita | 0:48f30ad8e377 | 10 | * @param num the number of elements you want to get |
hirokimineshita | 0:48f30ad8e377 | 11 | */ |
hirokimineshita | 0:48f30ad8e377 | 12 | void read_some(FILE *f,double *ar,int num){ |
hirokimineshita | 0:48f30ad8e377 | 13 | for(int i=0; i<num; i++)fscanf(f,"%lf,",&ar[i]); |
hirokimineshita | 0:48f30ad8e377 | 14 | } |
hirokimineshita | 0:48f30ad8e377 | 15 | |
hirokimineshita | 0:48f30ad8e377 | 16 | #endif |