# 我朋友写的C代码，挺有意思，预定义的强大。

**URL:** <https://forum.90sec.com/t/topic/3651>\
**Category:** 工具资源\
**Created:** [2012 年6 月 7 日 05:51 UTC](https://forum.90sec.com/t/topic/3651 "2012-06-07T05:51:45Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

作者： ![SUNRISE](https://forum.90sec.com/user_avatar/forum.90sec.com/sunrise/32/11448_2.png) [@SUNRISE](https://forum.90sec.com/u/SUNRISE)\
发布日期： [2012 年6 月 7 日 05:51 UTC](https://forum.90sec.com/t/topic/3651/1 "2012-06-07T05:51:45Z")

</div>

```c

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define THIS char buf[8];
#define IS int age, married;
#define MY scanf("%s", buf);
#define FIRST scanf("%d", &age);
#define TIME scanf("%d", &married);
#define TO if (strcmp(buf, "male") == 0) {
#define HELP if (age <= 21) {
#define OTHERS if (married) {
#define CODING printf("C+\n");
#define FOR } else {
#define HOMEWORK printf("B+\n");
#define I } } else if (age > 21 && age <= 26) { if (married) {
#define WANT printf("A\n"); } else { printf("B\n"); } } else { printf("B\n"); } } else { if (age <= 21) { printf("C+\n"); } else { printf("A\n"); } }
#define YOU return 0;

int main (int argc, char const* argv[])
{

```

THIS IS MY FIRST TIME TO HELP OTHERS CODING FOR HOMEWORK  
I WANT YOU /\*TO KNOW WHAT IS THE KNOWLEDGE POWER OF HUMAN BEING \*/  
}

---

<div class="post-metadata">

作者： ![875215700](https://forum.90sec.com/letter_avatar_proxy/v4/letter/8/8c91f0/32.png) [@875215700](https://forum.90sec.com/u/875215700)\
发布日期： [2012 年6 月 7 日 06:06 UTC](https://forum.90sec.com/t/topic/3651/2 "2012-06-07T06:06:50Z")

</div>

话说只是小技巧而已

---

<div class="post-metadata">

作者： ![sincoder](https://forum.90sec.com/user_avatar/forum.90sec.com/sincoder/32/11422_2.png) [@sincoder](https://forum.90sec.com/u/sincoder)\
发布日期： [2012 年6 月 7 日 07:22 UTC](https://forum.90sec.com/t/topic/3651/3 "2012-06-07T07:22:31Z")

</div>

这个叫 宏定义。。。

---

<div class="post-metadata">

作者： ![SUNRISE](https://forum.90sec.com/user_avatar/forum.90sec.com/sunrise/32/11448_2.png) [@SUNRISE](https://forum.90sec.com/u/SUNRISE)\
发布日期： [2012 年6 月 7 日 08:35 UTC](https://forum.90sec.com/t/topic/3651/4 "2012-06-07T08:35:42Z")

</div>

\*\*回复 [3#](http://www.90sec.org/redirect.php?goto=findpost&pid=28396&ptid=2498) _sincoder_ \*\*

```
 = =。一个意思嘛

```

---

<div class="post-metadata">

作者： ![SUNRISE](https://forum.90sec.com/user_avatar/forum.90sec.com/sunrise/32/11448_2.png) [@SUNRISE](https://forum.90sec.com/u/SUNRISE)\
发布日期： [2012 年6 月 7 日 08:41 UTC](https://forum.90sec.com/t/topic/3651/5 "2012-06-07T08:41:42Z")

</div>

\*\*回复 [2#](http://www.90sec.org/redirect.php?goto=findpost&pid=28383&ptid=2498) _sweet_ \*\*

```
嗯，不是说技术有多强大，而是下面那段话，送给初学者，蛮不错的。

```

---

<div class="post-metadata">

作者： ![lpcdma](https://forum.90sec.com/letter_avatar_proxy/v4/letter/l/13edae/32.png) [@lpcdma](https://forum.90sec.com/u/lpcdma)\
发布日期： [2012 年6 月 7 日 12:44 UTC](https://forum.90sec.com/t/topic/3651/6 "2012-06-07T12:44:11Z")

</div>

这么写！注释都不用了！  
可以用来泡妹子！

---

<div class="post-metadata">

作者： ![user72](https://forum.90sec.com/letter_avatar_proxy/v4/letter/u/bbce88/32.png) [@user72](https://forum.90sec.com/u/user72)\
发布日期： [2012 年6 月 7 日 12:53 UTC](https://forum.90sec.com/t/topic/3651/7 "2012-06-07T12:53:47Z")

</div>

大量使用宏....没看出来一点有意思

---

<div class="post-metadata">

作者： ![zyq8709](https://forum.90sec.com/user_avatar/forum.90sec.com/zyq8709/32/11658_2.png) [@zyq8709](https://forum.90sec.com/u/zyq8709)\
发布日期： [2012 年6 月 7 日 13:56 UTC](https://forum.90sec.com/t/topic/3651/8 "2012-06-07T13:56:03Z")

</div>

这个真心的强大，服了

---

<div class="post-metadata">

作者： ![SUNRISE](https://forum.90sec.com/user_avatar/forum.90sec.com/sunrise/32/11448_2.png) [@SUNRISE](https://forum.90sec.com/u/SUNRISE)\
发布日期： [2012 年6 月 7 日 15:52 UTC](https://forum.90sec.com/t/topic/3651/9 "2012-06-07T15:52:48Z")

</div>

\*\*回复 [6#](http://www.90sec.org/redirect.php?goto=findpost&pid=28442&ptid=2498) _lpcdma_ \*\*

```
用这个泡妹子注定是要失败的。。。你不会盼着妹子的电脑上装gcc吧？

```

---

<div class="post-metadata">

作者： ![user40](https://forum.90sec.com/user_avatar/forum.90sec.com/user40/32/11393_2.png) [@user40](https://forum.90sec.com/u/user40)\
发布日期： [2012 年6 月 11 日 14:18 UTC](https://forum.90sec.com/t/topic/3651/10 "2012-06-11T14:18:58Z")

</div>

哈哈···多此一举···

---

<div class="post-metadata">

作者： ![4shv](https://forum.90sec.com/user_avatar/forum.90sec.com/4shv/32/11434_2.png) [@4shv](https://forum.90sec.com/u/4shv)\
发布日期： [2012 年6 月 28 日 08:55 UTC](https://forum.90sec.com/t/topic/3651/11 "2012-06-28T08:55:30Z")

</div>

我想问，有什么用？

---

<div class="post-metadata">

作者： ![rootsir](https://forum.90sec.com/letter_avatar_proxy/v4/letter/r/8baadc/32.png) [@rootsir](https://forum.90sec.com/u/rootsir)\
发布日期： [2012 年6 月 30 日 01:53 UTC](https://forum.90sec.com/t/topic/3651/12 "2012-06-30T01:53:25Z")

</div>

真是闲着没事干呀 {:4\_51:} 服了
