您的位置:首页 > 移动开发 > 微信开发

写在情人节的小程序

2012-02-14 14:03 246 查看
 "对你爱 爱 爱不完"!

#include <iostream>
using namespace std;

int main()
{
for (unsigned char times = 0; times <= 255; ++times)
{
cout << "我爱你!" << endl;
}
return 0;
}


"说一万遍我爱你 直到你满意"!

#include <windows.h>
#include <string>
#include <iostream>
using namespace std;

bool enough = false;

int DarlingSayOK(const char * szmsg)
{
string strmsg;
do
{
getline(cin, strmsg);
} while (szmsg != strmsg);
enough = true;
return 0;
}

typedef DWORD (__stdcall * ThreadFunc)(void*);

int main()
{
CreateThread(NULL, 0, (ThreadFunc)(DarlingSayOK), (void *)"OK!", 0, NULL);
for (int times = 0; times < 10000 && !enough; ++times)
{
cout << "I Love You!" << endl;
Sleep(500);
}
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  null string