码迷,mamicode.com
首页 > 其他好文 > 详细

纯娱乐~程序员也可以通过程序来获取女票~

时间:2015-05-18 14:44:08      阅读:152      评论:0      收藏:0      [点我收藏+]

标签:cc++   程序员   女票   女朋友类   

谁说IT男找不到女票!劳资写一段代码告诉你,IT男要女票还不是分分钟的事!只要不死,一天换一个,而且有着年芳十八,有车有房,父母双亡的标准动漫设定~


看代码~


#include <iostream>
#include <windows.h>


using namespace std;




#define ONE_DAY (86400 * 1000)//一天的秒数


class GirlFriend
{
public:
GirlFriend *thisGirl(){return this;}
void haveCars(){
cout << "This girl has a lots of cars ~~" << endl;
}
void haveMoney(){
cout << "This girl is fabulously rich" << endl;
}
void noParents(){
cout << "Her parents passed away when she was very young" << endl;
}
GirlFriend(int old = 18){
thisGirl()->old = old;
cout << "this girl is " << this->old << " years old~" << endl;
thisGirl()->haveCars();
thisGirl()->haveMoney();
thisGirl()->noParents();
cout << "Most important thing is that she is your girlfrend!!!" << endl;
}
~GirlFriend(){
cout << "The girl being dumped by you~~" << endl;
}
protected:
private:
int old;
};




int main()
{


while (1)
{
GirlFriend *gf = new GirlFriend();//创建新女友
Sleep(ONE_DAY);//睡眠一天
delete gf;//删除
}
return 0;
}


技术分享

纯娱乐~程序员也可以通过程序来获取女票~

标签:cc++   程序员   女票   女朋友类   

原文地址:http://blog.csdn.net/u013267687/article/details/45822013

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!