如何使其工作? C++类型真的让人困惑:将常量wchar_t *转换为WCHAR *
std::wstring wquery = std::wstring(query.begin(), query.end());
//split names
std::vector<WCHAR*> split_names;
std::stringstream ss;
ss.str(names);
std::string name;
while (std::getline(ss, name, ',')) {
split_names.push_back(
(
std::wstring(
name.begin(),
name.end()
)
).c_str()
); //error can't assign const wchar_t* into WCHAR*
}
什么是查询在这里?请提供[MCVE](http://stackoverflow.com/help/mcve) – wasthishelpful
它们不相等? –
你为什么使用'WCHAR',以及它是如何定义的。 –