【发布时间】:2017-01-19 08:38:45
【问题描述】:
在 google play 游戏服务上保存游戏所需的数据格式为:std::vector<uint8_t>,在“数据格式”下指定:
https://developers.google.com/games/services/cpp/savedgames
我假设向量代表某种字节数组。那是对的吗 ?那么如何将std::string 转换为std::vector<uint8_t> 呢?
【问题讨论】:
-
如果您想逐个字符地执行此操作,您可以循环并将元素转换/添加到向量...