标题:刚学C语言,出现这个错误请教各位![Error] 'max' was not declared in thi ...
取消只看楼主
huhq
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2015-3-30
结帖率:100%
已结贴  问题点数:20 回复次数:1 
刚学C语言,出现这个错误请教各位![Error] 'max' was not declared in this scope
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>


main ()
{
int a,b,c;  /* defined varitions */
scanf("%d,%d",&a,&b);   
c=max (a,b);
printf ("max=%d",c);
}


int max (int x,int y);
{
int z;
if (x>y)z=x;
else z=y;
return (z);
}
搜索更多相关主题的帖子: include C语言 return declared 
2015-03-30 16:29
huhq
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2015-3-30
得分:0 
楼上:去掉";"后编译出同样的错误提示。
2015-03-30 16:55



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




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

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