C 语言写的爱情诗歌
来源:互联网 发布:sql 合计多列数据 编辑:程序博客网 时间:2024/06/11 20:56
/* ************************************************ File Name:Love.c***** Description:Love Story about you and me***** Author:JPing.Cai***** Date:2014-5-10***** Last Version:1.0* *******************************************/#include <stdio.h>struct Position {bool isEqual(Position p) {}void together(Position &p) {}};struct Hand {void hold(Hand &hand, int time) {}};struct Arms {Position between() {}};struct Heart {Position position;};struct Person {Position position;Hand hand;Arms arms;Heart heart;struct Emotion {int happiness;struct Love {Person *who;int deep;}love;Person *hostPerson;Emotion(Person *p):hostPerson(p) {}}emotion;bool meet(Person &p) {}bool miss(Person &p) {}bool love(Person &p) {}bool follow(Person &p) {}Person():emotion(this) {}void is(Person &p) {}};#define FOREVER_LOVE 10000#define FOREVER trueint main(int argc, char const *argv[]){Person you, me;/* the person who I love is you */me.emotion.love.who->is(you);/* the person who you love is me */you.emotion.love.who->is(me);/* whether you meet me or notI am here, not sad, not happy */if (you.meet(me) || !you.meet(me)) {me.emotion.happiness++;me.emotion.happiness--;}/*whether you miss me or notEmotion is there, not come, not go*/if (you.miss(me) || !you.meet(me)) {me.emotion;you.emotion;}/*whether you love me or notLove is there, not increase, not reduce*/if (you.love(me) || !you.love(me)) {me.emotion.love.deep++;me.emotion.love.deep--;}/*whether you follow me or notMy hands is in yours, never let go*/if (you.follow(me) || !you.follow(me)) {me.hand.hold(you.hand, FOREVER_LOVE);}/*Come to my arms,or, let me live in your heart,silence, love, quietness, gladness*/do {if (you.position.isEqual(me.arms.between())) continue;else me.position.together(you.heart.position);me.emotion.love.deep = you.emotion.love.deep = FOREVER_LOVE;} while(FOREVER);return 0;}
1 0
- C 语言写的爱情诗歌
- 一个女生用C语言写的爱情函数
- 一个女生用C语言写的爱情函数
- 一个女生用C语言写的爱情函数
- 一个女工程师用C语言写的爱情函数
- 古代爱情诗歌
- 古诗歌--爱情篇
- c++编写爱情诗歌
- IT人的爱情诗歌,学计算机的都懂
- 以前写的文字——诗歌
- 华工爱情C语言
- [转]一个girl用C写的爱情代码!!
- C语言之爱情红玫瑰
- 诗歌《致爱人》通过第二届心心相印爱情诗歌初审
- c语言写的万年历
- C语言写的俄罗斯方块
- C语言写的情书
- c语言写的通讯录
- Spring MVC-Controller
- 每日算法之八:String to Integer (atoi) 及溢出分析
- linux(二十一):apache服务配置(二)
- RedHat&CentOS 6.4安装谷歌浏览器chrome
- 德鲁克之领导特质的五项主要习惯
- C 语言写的爱情诗歌
- 1Z0-51 QUESTION 18 DISTINCT的用法
- 基于bootstrap3模态框的插件-czf_modal.js
- A星算法
- reaver使用方法
- win7下制作ubuntu系统安装启动盘和U盘安装ubuntu全过程
- 理财的四个数字
- wxpython实现界面,读取excel配置文件并查询道具信息
- 取消gdb退出时提示