| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1620 人关注过本帖
标题:新手有两个问题解决不了 求指点
取消只看楼主 加入收藏
aimengzhh
Rank: 2
等 级:论坛游民
帖 子:16
专家分:15
注 册:2016-4-1
结帖率:50%
收藏
 问题点数:0 回复次数:1 
新手有两个问题解决不了 求指点
/*    example1.1   calculate the sum of a and b*/
#include<stdio.h>
/*  This is the main program */
void main()
{
    int a,b,sum;     /*定义变量*/
    a=10;b=24;
    sum=add(a,b);
    printf("sum=%d\n",sum);
}

/*This function calculates the sum of x and y  */
int add(int x,int y)
{    int z;
    z=x=y;
    return(z);
}

错误提示:error c2065: add  :  undeclared  identifier
          error c2373:  add  :  redefinition different type modifiers
 
     该怎么解决  求指教    谢各位
搜索更多相关主题的帖子: different function include return 
2016-04-01 15:54
aimengzhh
Rank: 2
等 级:论坛游民
帖 子:16
专家分:15
注 册:2016-4-1
收藏
得分:0 
    跪谢!!    跪谢!!    跪谢!!    跪谢!!    跪谢!!
2016-04-01 16:22
快速回复:新手有两个问题解决不了 求指点
数据加载中...
 
   



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

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