![](/img/trans.png)
[英]Could someone help me figure out why I am getting the error malloc(): corrupted top size
[英]if someone could help me it would be incredible i am a student and got the error while solving this program
> main.c: In function ‘main’:
main.c:42:5: warning: statement with no effect [-Wunused-value]
for(i=n-1;i>=0;-i)
^
main.c:46:9: warning: statement with no effect [-Wunused-value]
for(j=i-1;j>=0;-j)
^
for(i=n-1;i>=0;-i)
for(j=i-1;j>=0;-j)
-i
应该是--i
, -j
应该是--j
。 如果没有,这将是一个无限循环。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.