gpt4 book ai didi

c++ - 如何转换pugi :char_t* to string?

转载 作者:塔克拉玛干 更新时间:2023-11-03 08:00:56 25 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
How to convert pugi::char_t* to string

如何将 pugi:char_t* 类型转换为 wchar_t 字符串?

我想将 child_value() 的结果与某个 utf8 字符串进行比较,如果不进行这种转换,我将无法做到这一点。

for (pugi::xml_node_iterator it = words.begin(); it != words.end(); ++it)
{
wchar_t* wordValue = it->child("WORDVALUE").child_value();
}

这个赋值返回错误,因为右边是 pugi::char_t* 而左边是 whar_t*

谢谢

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