标题:define 的问题
取消只看楼主
ADALE
Rank: 2
等 级:新手上路
威 望:4
帖 子:483
专家分:0
注 册:2005-11-18
 问题点数:0 回复次数:1 
define 的问题
在这里我首先祝各位新年快乐!^-^

I want to say that thank you for helping me so much .If without you I don't think I can learn C pass the final exam so easy.So I really thinks.I still need your helps in the futhur.Meanwhile I hope I can help the new comer,though I just learn C one term.





# include <stdio.h>
# define sw(x,y) {x^=y; y^=x; x^=y;}
void main ()
{
int a=10,b=01;
sw (a,b);
printf ("%d,%d\n",a,b);
}
“^”是什么意思。



# include <stdio.h>
# define MIN(x,y) (x)>(y)?(x):(y)
# define T(x,y,r) x*r*y/4
void main ()
{
int a=1,b=3,c=5,s1,s2;
s1=MIN(a=b,b-a);
s2=T(a++,a*++b,a+b+c);
printf ("%s,%d\n",s1,s2);
}

可以写一下过程给我看吗



#define PI 3.14159

#define S(r) PI*(r)*(r)

.....

area=S(a);

这个预处理错在哪
搜索更多相关主题的帖子: helping include without really color 
2006-01-28 21:07
ADALE
Rank: 2
等 级:新手上路
威 望:4
帖 子:483
专家分:0
注 册:2005-11-18
得分:0 

不懂.....


喜欢宁静的平凡生活
2006-01-29 12:03



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




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

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