递归火山软件开发平台
标题:
火山视图 怎么 文本 到 string 或者字节集到 string 你们知道吗
[打印本页]
作者:
xiaofana
时间:
2023-11-28 14:46
标题:
火山视图 怎么 文本 到 string 或者字节集到 string 你们知道吗
火山视图 怎么 文本 到 string 或者字节集到 string 你们知道吗
作者:
hcwanz
时间:
2023-11-28 15:06
本帖最后由 hcwanz 于 2023-11-28 15:36 编辑
std::string 文本(火山数据指针);
作者:
xiaofana
时间:
2023-11-28 15:17
hcwanz 发表于 2023-11-28 15:06
std::u16string(取文本指针())
code.h
#pragma once
#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
string encryptDecrypt(string input)
code.cpp
#include "code.h"
#include <iostream>
#include <stdio.h>
#include <string.h>
string encryptDecrypt(string toEncrypt) {
char key[3] = {'K', 'C', 'Q'};
string output = toEncrypt;
for (int i = 0; i < toEncrypt.size(); i++)
output
= toEncrypt
^ key[i % (sizeof(key) / sizeof(char))];
return output;
}
火山调用示例!
欢迎光临 递归火山软件开发平台 (https://bbs.voldp.com/)
Powered by Discuz! X3.4