腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
0
回答
将
std
::
vector
<
bool
>转
换为
std
::
string
我有一个二进制数据的向量,并希望将其转
换为
字符串。我该如何着手这项任务呢?我只想说清楚,我并不想要一个只有1和0的字符串,我想让它每8个条目等于一个字符。
浏览 21
提问于2017-01-04
得票数 0
3
回答
将
std
::
vector
<
std
::
vector
<
std
::
string
>>转
换为
std
::
vector
<
std
::
vector
<double>>
、
、
、
这是我的二维矢量输入的一个小样本:我试图在下面的代码中遍历我的二维向量,希望我可以使用
std
::stod()来解析字符串并将它们转
换为
双变量,但是它没有工作。// Here is my original
vector
which I filled by taking input from a csv file
std
::
vector
<
std
::
vector
<
std
::
string
>&g
浏览 5
提问于2020-02-01
得票数 0
回答已采纳
1
回答
将
array<
String
^>^转
换为
std
::
vector
<
std
::
string
>
如何
将
托管array<
String
^>^转
换为
std
::
vector
<
std
::
string
>。下面的代码没有编译,我也不知道为什么。很有趣,例如,如果我使用int,那么它就能正常工作。预先谢谢:{
浏览 3
提问于2014-08-01
得票数 2
回答已采纳
2
回答
将
std
::
vector
<char>转
换为
std
::
string
、
我尝试使用以下命令
将
std
::
vector
<char>转
换为
字符串:buffer = readBuffer.data
浏览 1
提问于2013-11-06
得票数 4
回答已采纳
1
回答
如何
将
std
::
vector
<
std
::
vector
<
std
::
string
> *转
换为
void >*?
、
、
、
、
这里的m_out定义如下:static_cast<
std
::
vector
<
std
::
vector
<
std
::
string
> >* m_out; m_out->clear(); m_out = static_cast<
std
::
vector
<
std
::
vec
浏览 2
提问于2015-02-14
得票数 0
1
回答
std
::类内的函数初始化
、
、
<
bool
(const
std
::
vector
<
std
::__cxx11::basic_
string
<char> >&)> >’ #
bool
f(const
std
::
vector
<
std
::
string
>& s) {
std
::cout
浏览 3
提问于2017-05-30
得票数 4
回答已采纳
4
回答
将
std
::
string
转
换为
std
::
vector
<char>
我正在使用一个接受数据作为char%s的
vector
的库。我需要向该库传递一个
string
。const
std
::
vector
<char> charvect(json_str.begin(), json_str.end
浏览 5
提问于2011-11-24
得票数 54
回答已采纳
4
回答
将
字符串数据附加到
std
::
vector
<
std
::byte>>
、
、
、
我正在实现一个HTTP服务器,我遵循的API
将
原始响应数据定义为一个
std
::
vector
<
std
::byte>>。我在代码中将http响应头存储为
std
::
string
,在返回之前,我必须将它们写入原始响应数据。问题是,我无法找到一种
将
数据从
std
::
string
写入/追加到
std
::
vector
<
std
::byte>>的干净方法(我
浏览 0
提问于2018-02-12
得票数 3
回答已采纳
2
回答
基于不同大小和类型的另一个向量对点的向量进行排序
、
、
struct myCompareStruct
std
::
vector
<
std
::
string
> all; myCompareStruct(const
std
::
vector
<
std
::
string
>& a, const
std
::
vector
<item
浏览 1
提问于2013-10-20
得票数 0
1
回答
如何
将
任何值转
换为
vector
<
bool
>
、
、
我正在尝试
将
任何对象转
换为
std
::
vector
<
bool
> (表示在内存中设置的用于存储对象的位)。因此,对于uint16_t(0x1234),我希望获得
std
::
vector
<
bool
> 0001001000110100。对于float(3.14f),也就是内存中的0x4048F5C3,我想获取
std
::
vector
<
bool
> 0100000001
浏览 3
提问于2020-03-23
得票数 1
2
回答
如何
将
字符串转
换为
uint32_t
、
、
、
、
我有一个程序,它逐行读取文件的内容,
将
每一行存储在字符串的向量中,然后打印向量的内容。 *
bool
getFileContent(
std
::
string
fileName,
s
浏览 0
提问于2019-07-29
得票数 5
回答已采纳
1
回答
如何
将
std
::
string
转
换为
std
::
vector
?
、
、
我已经成功地
将
数据序列化为字节,好吧,但是将其转换回向量会得到错误的值:#include <
string
> {
std
::cout << "Original
vector
: " <<
浏览 16
提问于2022-12-01
得票数 1
回答已采纳
2
回答
从
std
::
string
到
std
::
vector
<
bool
>的快速转换
、
、
实际上,从
string
转换到位
vector
只需要大约1.5倍于另一种方式的转换。
std
::
vector
<
bool
> frombytes(const
std
浏览 0
提问于2020-06-17
得票数 3
4
回答
将
vector
<
std
::
string
>转
换为
vector
<double>
、
、
、
我希望
将
每个元素转
换为
double,并将其存储在
vector
<double>中。做这件事最好的方法是什么?我在找这样的东西:似乎没有这样的事情,编辑:下面是我最后使用的内容:
std
::
vector
<double> convertStrin
浏览 2
提问于2013-11-28
得票数 7
回答已采纳
3
回答
嵌套lambda函数
、
、
我有以下代码: return [&](const foo& sr)->
std
::
string
{: 编辑:
std</em
浏览 7
提问于2017-04-24
得票数 5
回答已采纳
2
回答
从另一个子类调用虚拟函数
、
、
、
、
因此,首先,它应该
将
字符串分离成标记,然后存储在向量中。然后,它应该将其转
换为
rpn表示法(例如,3+4 -> 3 4 +),这是我现在卡在上面的部分。public:
bool
process(const
std
::
string
& input,
std</e
浏览 1
提问于2014-04-11
得票数 0
回答已采纳
2
回答
在C++中转换模板专门化的问题
、
我想通过=()操作符将我的LIFO模板专门化转
换为
FIFO模板专门化。我试着找出问题出在哪里,但我总是犯同样的错误。LFO.h#include <
vector
>#inc
浏览 2
提问于2020-03-16
得票数 0
回答已采纳
1
回答
std
::_Bit_rerefence&类型的非const引用初始化无效
、
嗯,我正在编写一段代码来
将
两个字符串转换成一个位集(不幸的是,由于编译时模板常量要求,
std
::bitset无法使用)。::
string
line;
std
::
string
pattern;(const char c) ->
bool
{ return(c == 'B'
浏览 2
提问于2019-11-10
得票数 1
回答已采纳
1
回答
从bson转过来的json身上没有任何东西
、
、
std
::
vector
<
std
::uint8_t> v = nlohmann::json::to_bson(jInit);for (auto&i : v) s.push_back(v[i]);
std
::ofstream ofs(s_basePath + "dump.txt"); ofs << nlohmann::json::fro
浏览 12
提问于2022-04-06
得票数 0
回答已采纳
1
回答
无法
将
push_back转
换为
矢量
、
、
我已经创建了类的一个实例,但是我无法
将
船名push_back到向量。 6 IntelliSense:没有重载函数"
std
::
vector
<
浏览 4
提问于2015-04-06
得票数 0
回答已采纳
点击加载更多
相关
资讯
精准姿态控制:旋转数学表示的转换技巧
C+的模板类vector的用法“一”
boost:asio中的buffer与streambuf简介
2025年CSP-J第一轮笔试模拟试卷(二)
C+实现xml解析器
热门
标签
更多标签
云服务器
ICP备案
对象存储
云点播
智聆口语评测
活动推荐
运营活动
广告
关闭
领券