void __fastcall TForm1::N14Click(TObject *Sender)
{
FILE *f;
int a=0,b;
int c[8];
char h;
if ((f = fopen("C:\\Program Files\\Borland\\CBuilder6\\Bin\\FILENAME.C_Str", "rt"))
== NULL)
{
fprintf(stderr, "Cannot open input file.\n");
}
h = fgetc( f );
while(!feof(f))
{ while(h!=' ')
{
b=h;
a=a+b;
}
c[8]=h;
while(h== '\n')
{
switch(a)
{
case 195: C_S=c[8]; break;
case 67:
C=c[8];
break;
case 70:
F=c[8];
break;
case 150:
SC=c[8];
break;
case 204:
CALL=c[8];
break;
case 208:
Q_R=c[8]; break;
}
printf("\n");
}
if ((f = fopen("FILENAME.C_Str", "rt"))
== NULL)
break;
}
int
fclose(FILE *f);
}
这是那段程序
不知道哪个循环出错了
运行起来老是未响应