这个错误提示意味着,您尝试使用的 join 函数没有可用于参数类型为 dchar[] 的重载。

您可以尝试使用 std.algorithm.joiner 代替 std.array.join 来解决此问题,例如:

import std.algorithm;

string saa = "hello";
string reversed = saa.array.reverse.joiner("").array;

这将使用 joiner 函数将 dchar[] 数组转换为字符串,然后再将其反转。

d语言我的以下核心代码编译的时候报错代码如下string saa = hello; string reversed = saaarrayreversejoin;报错提示如下onlineappd11 Error none of the overloads of template stdarrayjoin are callable using argument types !dchardlang

原文地址: https://www.cveoy.top/t/topic/fqPq 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录