jobs[i]
jobs[i]
}
}
//讀入作業數據函數
void readData()
{
FILE *fp;
char fname[
int i;
cout<<
strcpy(fname
cin>>fname;
if((fp=fopen(fname
cout<< } else{ while(!feof(fp)){ fscanf(fp,"%d %d %d %d",&jobs[quantity].number,&jobs[quantity].reach_time,&jobs[quantity].need_time,&jo bs[quantity].privilege); jobs[quantity].reach_hour=jobs[quantity].reach_time/100; jobs[quantity].reach_minite=jobs[quantity].reach_time%100; quantity++; } //輸出初始作業數據 cout<<"輸出初始作業數據"< cout<<"---------------------------------------------------------------"< cout.setf(2); [1] [2] [3] [4] [5] [6] [7] [8] [9]
From:http://tw.wingwit.com/Article/program/czxt/201311/24020.html