gpt4 book ai didi

c++ - 连接两个写入此缓冲区开头的字符串的函数?

转载 作者:行者123 更新时间:2023-11-28 07:57:34 25 4
gpt4 key购买 nike

我们在 Win32Api 中有 StringCchCat 函数,

Concatenates one string to another string. The size of the destination buffer is provided to the function to ensure that StringCchCat does not write past the end of this buffer.

好的..

StringCchCat(dirWPath, MAX_PATH, TEXT("\\*"));

我会得到:dirWPath + "\\*"

我寻找 get a :"\\*"+ dirWPath

谁有解决办法?

最佳答案

std::string first = dirWPath, second = "\\*";
std::string result = second + first;

关于c++ - 连接两个写入此缓冲区开头的字符串的函数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12370819/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com