I installed VC++6.0 this morning and tried the program. But it still had some problems, please help me!Thank you!

lynx (jane)
<本文发表于: 相约加拿大:枫下论坛 www.rolia.net/f >
1, I want to know a function that can read the current time of the system, and how to use it. Is it read the seconds or the minutes?In C, it is called biostime().
2, I built the .exe file and I ran it. The program first just read some parameters as you input them, and also the .dat file name. Please see below:

1 printf(" Please input learning factor---Et & dEt: (
Note:0.1>=Et>=0) \n");
2 scanf("%f",&Et);
3 scanf("%f",&dEt);

4 printf(" Please slope value of g() --- alfa:\n");
5 scanf("%f",&alfa);
6 printf(" Please input learning factor---beita:\n");
7 scanf("%f",&beita);
8 printf(" Please input learning factor---bstep:\n");
9 printf(" ( Note: 0.1beita>bstep>0.000 ) \n");
10 scanf("%f",&bstep);

11 gets(ldfnm);
12 printf(" Please input learning data file name(iol?.dat):\n");
13 gets(ldfnm);

14 sss=fopen(ldfnm,"r");
15 fscanf(sss,"%d%d",&inputN1,&inputN1);
16 fscanf(sss,"%d",&modelN);
17 outputN=62;
18 position=ftell(sss);
19 p=position;
20 fclose(sss);

So the above part works until line 13, I can input all those parameters. But when I input the .dat file name (line 12 stll works), it stop working. A window jump out and said that
"Debug assetion failure.
Program: D:\program\Debug\learning.exe
File: fscanf.c
Line: 54
expression: streams!=NULL"

Could you please tell what's wrong with the program?
Thank you very much!
<本文发表于: 相约加拿大:枫下论坛 www.rolia.net/f >

2001-7-23 -04:00

回到话题: 我在编程时又遇到一个问题,专家们,请进。

回到论坛: HOME枫下论坛枫下论坛主坛工作学习IT杂谈