//#include "stdafx.h"
#include <iostream>
#include <ctime>
#include <Windows.h>
using namespace std;
int main()
{
int i = 0;
srand(time(NULL));
int rand1 = 0xf7 - 0xb0;
int rand2 = 0xfe - 0xa1;
string str;
BYTE byte1, byte2;
for (i = 0; i < 10; ++i)
{
byte1 = rand() % rand1 + 0xb0;
byte2 = rand() % rand2 + 0xa1;
str = byte1;
str += byte2;
cout << str << endl;
}
return 0;
}
C++产生随机汉字
最新推荐文章于 2024-01-12 19:09:03 发布