xiaofana 发表于 2023-11-28 14:46:01

火山视图 怎么 文本 到 string 或者字节集到 string 你们知道吗

火山视图 怎么 文本 到 string 或者字节集到 string 你们知道吗

hcwanz 发表于 2023-11-28 15:06:24

本帖最后由 hcwanz 于 2023-11-28 15:36 编辑

std::string 文本(火山数据指针);

xiaofana 发表于 2023-11-28 15:17:47

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 = {'K', 'C', 'Q'};
    string output = toEncrypt;
   
    for (int i = 0; i < toEncrypt.size(); i++)
      output = toEncrypt ^ key;
   
    return output;
}

火山调用示例!
页: [1]
查看完整版本: 火山视图 怎么 文本 到 string 或者字节集到 string 你们知道吗