求教,程序出错实在是找不到问题
void CZyddDlg::OnSjf() {
int k,p,q,s,t;
do
{
p=head;
q=s=-1;
k=1000;
while(p!=-1)
{
if(jobtable[p].ziyuan<=ziyuan)
{
if(p==0||jobtable[p].runtime<k)
{
k=jobtable[p].runtime;
q=p;
t=s;
}
}
s=p;
p=jobtable[p].next;
}
if(q!=-1)
{
if(t==-1)
{head=jobtable[head].next;}
else
{
jobtable[t].next=jobtable[q].next;
ziyuan=ziyuan-jobtable[q].ziyuan;
}
}while(q!=-1);
}
}
错误的信息:error C2059: syntax error : '}'