我在C++中有一串数字:比如string str ="1234567012"
我希望将它复制到一个int数组,这样数组的每个元素都有一个数字.现在我可以使用迭代器,并一次迭代一次并使用static_cast<int>(*iter).但是,还有更简单直接的方法吗?
static_cast<int>(*iter)
最后我想将int数组重新复制到一个字符串数组.
请帮助我完成上述两个步骤.
c++ linux arrays string
arrays ×1
c++ ×1
linux ×1
string ×1