相关疑难解决方法(0)

如何在C++ 11中将u32string转换为int?

我们如何可以转换u32stringint在C++ 11?

另外,我应该使用什么方法将部分字符串转换为int- 让我们说开始和结束迭代器可用?

我试过了:

u32string test=U"14";
cout << atoi(test.c_str());
Run Code Online (Sandbox Code Playgroud)

但它抛出:

candidate function not viable: no known conversion from 'const char32_t *' to 'const char *' for 1st argument
extern int atoi (__const char *__nptr)
Run Code Online (Sandbox Code Playgroud)

c++ string localization type-conversion c++11

7
推荐指数
1
解决办法
3088
查看次数

标签 统计

c++ ×1

c++11 ×1

localization ×1

string ×1

type-conversion ×1