基本上我试图从我的源代码中保护一些字符串,但我一直在这行上出现此错误:
playerOptionsMenu->SetMenuTitle(base64_encode(reinterpret_cast<const unsigned char*>(playeroptionstitle.c_str()), playeroptionstitle.length()));
base64_encode
上发生错误以下是playeroptionstitle的定义:
const std::string playeroptionstitle = "Player Options";
这是base64_encode的标题:
std::string base64_encode(unsigned char const* , unsigned int len);
我得到的错误是:错误:没有合适的转换函数来自&#34; std :: string&#34; to&#34; char *&#34;存在