你必需要保证有一个bedoresort.txt文件跟你的cpp文件放在一起。其次,你的冒算法写错了,应该写为:for(j=0;j<100000;j++) for (i=j;i<100000;i++) if (a[i]>a[i+1]) { temp=a[i]; a[i]=a[i+1]; a[i+1]=temp; }
你有十万个数字的文件吗? 不然你怎么运行的。