cin>>jobname;
cout<<
cin>>number;
if(number>total){
cout<< } else{ p=initial_job(); strcpy(p->name,jobname); p->next=jhead->next; jhead->next=p; p->quantity=number; cout<<"所申請到的空閒塊號流:"; for(i=0;i if(head->quantity>1){ cout< head->quantity--; p->cell[i]=head->cell[head->quantity-1]; } else{ cout< p->cell[i]=head->cell[head->quantity-1]; head->quantity--; if(head->next!=NULL){ head=head->next; } } total--; } } [1] [2] [3] [4] [5] [6] [7] [8]
From:http://tw.wingwit.com/Article/program/czxt/201311/11252.html