'swap' was not declared in this scope 求C语言大神帮忙,我不是已经定义void了吗?

日期:2018-04-04 20:50:44 人气:1

'swap' was not declared in this scope 求C语言大神帮忙,我不是已经定义void了吗?

#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); printf("%d,%d
    A+
热门评论