是不是编译器的问题呢?
我输入的程序:#include "stdio.h"
struct clientData{
int accNum;
char lastName[ 15 ];
char firstName[ 10 ];
double balance;
}
void main()
{
int i;
struct clientData blankClient = { 0, "", "", 0.0 };
FILE *cfPtr;
if( ( cfPtr = fopen( "credit.dat", "wb" ) ) == NULL ){
printf( "Files could not be opened\n" );
}
else{
for( i = 0; i < 100; i++ ){
fwrite( &blankClient, sizeof( struct clientData ), 1, cfPtr );
}
fclose( cfPtr );
}
}
运行不了
提示错误:too many types in declaration
不知道是什么原因?是不是编译器的问题呢?我用的是《c/c++程序设计学习与实验系统》,求解!!