标题:求助!这个程序应该怎么改呢
取消只看楼主
l2480035288
Rank: 1
等 级:新手上路
帖 子:35
专家分:0
注 册:2013-3-15
结帖率:73.33%
已结贴  问题点数:20 回复次数:1 
求助!这个程序应该怎么改呢
#include<stdio.h>
int main()
{
    void swap(int *x,int *y);
    int a,b;
    int *x,*y;
    printf("input a,b:");
    scanf("%d%d",&a,&b);
    printf("a=%d,b=%d",a,b);
    x=&a;
    y=&b;
    swap(x,y);
    printf("a=%d,b=%d",*x,*y);
    return 0;
}
void swap(int *x,int *y);
{
    int z;
    z=*x;
    *y=*x;
    z=*y;
    return(z);
}
   

程序显示F:\c++\VC6\MyProjects\juk\sds.cpp(17) : error C2447: missing function header (old-style formal list?)

搜索更多相关主题的帖子: void function return formal 
2013-03-21 22:35
l2480035288
Rank: 1
等 级:新手上路
帖 子:35
专家分:0
注 册:2013-3-15
得分:0 
回复 8楼 qwe885167759
好了  谢谢
2013-03-22 21:23



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-401546-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 2.067696 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved