编译好的程序为了扩大范围我把数组由x[10]改到x[20]。而且x[12]都可以为什么超过12这个数字出来的东西都不一样了??整个程序就运行错误了??还有定义数组由范围吗?比如我定义a[200]就不行这是为什么???????
for(v=0;v<=m-1;v++)
{for(j=0;j<=m-1;j++)
{ for(l=0;l<=v-1;l++) { if(j==x[l]) break;}
if(j==x[l]) continue;
for(i=0;i<=n-1;i++)
{
if(Q[j][i]<=c[i]) d++;
}
if(d==n) {x[v]=j;
printf("\nLOADING");
printf(" Check Finished!! NO.%d process is Safe,The course is allocating according to the request",j+1);
for(k=0;k<=n-1;k++) c[k]=c[k]+a[j][k];
printf("Process NO.%d is Runing Finished!! And feed back Resource,The number of Resource NOW is :",j+1);
for(i=0;i<=n-1;i++)
printf(" -%d-",c[i]);
printf("\n");
d=0;break;}
d=0;
}
}
[此贴子已经被作者于2005-12-5 22:29:18编辑过]