- 金币:
-
- 奖励:
-
- 热心:
-
- 注册时间:
- 2004-2-5
|
|
试试这个
帖子 7
注册 2005-5-23
int main() {
int gpnum;
FILE *fp;
long lSize;
char * buffer;
if((fp = fopen("day0504.DAD","rb")) == NULL)
{
printf("Error: Cant open 000001.DAY !\n");
exit(0);
}
//readrec(fp);
fseek (fp , 0 , SEEK_END);
lSize = ftell (fp);
rewind (fp);
cout << lSize << endl;
buffer = (char*) malloc (4);
fread (buffer,1,4,fp);//33 FC 19 8C)
fread (buffer,1,4,fp); //未知
//cout << buffer << endl;
fread(&gpnum,1,4,fp);
cout <<"股票数:“<< gpnum<< endl;
fclose(fp);
}; |
-
查看全部评分
|
|