}
}
if(p!=){
cout<<该作业要申请A类资源数量:;
cin>>a;
cout<<该作业要申请B类资源数量:;
cin>>b;
cout<<该作业要申请C类资源数量:;
cin>>c;
flag=;
if((a>bankerremain_a)||(a>processes[p]need_aprocesses[p]a)){
cout<<错误所申请A类资源大于银行家所剩A类资源或该进程还需数量< flag=0;
}
if((b>banker.remain_b)||(b>processes[p].need_b-processes[p].b)){
cout<<"错误,所申请B类资源大于银行家所剩B类资源或该进程还需数量"< flag=0;
}
if((c>banker.remain_c)||(c>processes[p].need_c-processes[p].c)){
cout<<"错误,所申请C类资源大于银行家所剩C类资源或该进程还需数量"< flag=0;
}
if(flag){
banker.remain_a-=a;
banker.remain_b-=b;
banker.remain_c-=c;
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10]