www.1862.net > 'swAp' wAs not DEClArED in this sCopE 求C语言大...

'swAp' wAs not DEClArED in this sCopE 求C语言大...

#include // int main(){ 这行去掉,移动到下面 。不能在主函数里面定义函数!! void swap(int *qa,int *qb){ int temp; temp=*qa; *qa=*qb; *qb=temp;}int main(){// 把上面第二行移动到这里来。 int a,b,*pa=&a,*pb=&b; scanf("%d%d",pa,pb);...

在main函数前面加一句 void Swap(int x,int y);

网站地图

All rights reserved Powered by www.1862.net

copyright ©right 2010-2021。
www.1862.net内容来自网络,如有侵犯请联系客服。zhit325@qq.com