声控小猫模拟器 😹
2025-07-05 19:21:43
发布于:上海
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <thread>
#include <chrono>
void meowGenerator() {
const std::string moods[] = {"(=`ω´=)", "(=⌒‿‿⌒=)", "(=^・ェ・^=)", "(=TェT=)"};
srand(time(0));
while (true) {
int randDelay = 500 + rand() % 1500; // 0.5~2秒随机延迟
std::this_thread::sleep_for(std::chrono::milliseconds(randDelay));
// 随机生成喵语+颜文字
std::cout << "\n嗷";
for (int i = 0; i < 3 + rand() % 5; i++) std::cout << "~";
std::cout << "! " << moods[rand() % 4] << std::endl;
}
}
int main() {
std::cout << "⚠️ 警告:你启动了【混沌喵化程序】!按Ctrl+C停止" << std::endl;
std::cout << "加载声波: ";
for (int i = 0; i < 10; i++) {
std::cout << "▉";
std::flush(std::cout); // 实时刷新输出
std::this_thread::sleep_for(std::chrono::milliseconds(200));
}
std::thread catThread(meowGenerator);
catThread.join(); // 等待线程结束(实际不会结束,需强制停止)
return 0;
}
这里空空如也
有帮助,赞一个