如何在c++程序中导入数据文件
如何在c++程序中导入数据文件
日期:2016-07-19 09:13:02 人气:2
struct inf
{
int num;
char month[4];
int year;
int h;
int m;
int s;
int mi;
}*p;
//用一个结构体储存信息.
p=(struct inf*)malloc(12*sizeof(struct inf));
FILE *fp;
fp=fopen("北京.txt","r");
//打开文件
fscanf(fp,"%d%s%d