Initialize and read a file contents
Hi,
I have wrote below udf to read some data from a file. I got error. What is wrong? I think file doesn't open. ----------------------------- #include "udf.h" real inlet[2000][2]; int NI; char *fname1="d:\\prj\\unsteady\\rpm3500\\inlet.dat"; DEFINE_INIT(initializ,d) { FILE *fp; int i; fp=fopen(fname1,"r"); fscanf(fp,"%d\n",NI); fscanf(fp,"%f %f\n",&inlet[i][1],&inlet[i][2]); printf("NI=%d\n",NI); fclose(fp); } ------------------------------ |
All times are GMT -4. The time now is 06:24. |