It seems that you are an expert in C++, could you please help me? Just some simple questions.Thank you!

lynx (jane)
<本文发表于: 相约加拿大:枫下论坛 >
I installed VC++6.0 this morning and tried the program. But it still had some problems:
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 assertion 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? What means assertion failure?How to deal with it?
Thank you very much!
<本文发表于: 相约加拿大:枫下论坛 >

2001-7-23 -04:00

回到话题: (C++)How to get object from vector one by one in a loop? thanks. After I erase an element from a list,where the pointer will point to?

回到论坛: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论