C++小助手1.0.1

注:

只能在C++6.7.5运行

小助手代码:

#include<bits/stdc++.h>
#include<windows.h>
#include<conio.h>

using namespace std;

// 显示带有动画效果的文本
void ccc(string s) {
	for (char c : s) {
		cout << c;
		Sleep(50);
	}
	cout << endl;
}

// 加密字符串(简单的移位加密)
string encrypt(string str, int shift = 4) {
	for (char &c : str) {
		c += shift;
	}
	return str;
}

// 解密字符串
string decrypt(string str, int shift = 4) {
	for (char &c : str) {
		c -= shift;
	}
	return str;
}
// 保存用户名和密码到文件
void saveUser(const string& username, const string& password) {
	ofstream file("users.txt", ios::app);
	file << username << " " << encrypt(password) << endl;
	file.close();
}

// 检查用户名和密码是否存在并正确
bool authenticateUser(const string& username, const string& password) {
	ifstream file("users.txt");
	string savedUsernam
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值