Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:还是runtime error,郁闷,到底哪儿错了啊?In Reply To:还是runtime error,郁闷,到底哪儿错了啊? Posted by:hoho at 2003-10-16 13:07:53 > #include<stdio.h> > #include<stdlib.h> > void convert(int *num,int n) > { > int k=0,*arr=(int *)malloc(n); > char *brac=(char *)malloc(2*n); > for(int i=1;i<=n;i++) > { > for(int j=1;j<=num[i]-num[i-1];j++) > brac[k++]='('; 在某组数据下,这句中的k越界了,自己查查看吧 runtimeerror一般是数组越界的问题(如果没有其他很明显的原因) Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator