腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(9999+)
视频
沙龙
7
回答
std
::
copy
和
std
::vector问题
、
、
我理解这为什么会导致段错误:#include <vector>{ int iArr[5] = {1, 2, 3, 4, 5};#include <vector> using name
浏览 2
提问于2010-11-10
得票数 6
回答已采纳
1
回答
就地
std
::
copy
_if
、
、
在我看来,
std
::
copy
_if对于过滤容器非常有用:auto itEnd =
std
::
copy
_if(vec.beginvec.begin(),vec.resize(itEnd - vec.begin()); 但是,
std
::
copy
_if指定输入和输出范围不
浏览 1
提问于2014-03-25
得票数 4
回答已采纳
3
回答
从
std
::
copy
和
std
::
copy
_n中提取输入迭代器
、
、
我试图实现一个非序列化方法,它使用输入迭代器并执行一系列块读取(使用
std
::
copy
和
std
::
copy
_n)。像这样的东西(只是一个例子):InputIt unserialize(InputIt it)
std
::
copy
_n(it, sizeof(header_type), reinterpret_cast<char*>(&header));
std
::
copy
浏览 1
提问于2018-02-02
得票数 9
1
回答
使用
std
::
copy
时出错
、
造成问题的代码如下:
std
::istream_iterator<float>(iss),
std
::istream_iterator<float>(),
std
::back_inserter<
std
::vector<float>>(model.chunks.back().vectices尽管如果我用
浏览 4
提问于2012-08-02
得票数 0
回答已采纳
1
回答
如何用
copy
_if实现
std
::remove_
copy
_if?
、
、
::pointer_to_unary_function<ArgType, bool> Adapter;{
std
::remove_
copy
_if::vector<int>
copy</
浏览 2
提问于2011-04-28
得票数 2
1
回答
如何绑定
std
::filesystem::
copy
?
、
我想绑定
std
::filesystem::
copy
的第三个参数,即 void
copy
( const
std
::filesystem::path& from,
std
::filesystem::
copy
_options options ); 设置为某个值,比如
std
::filesystem:当我这样做的时候: namespace
浏览 26
提问于2021-09-16
得票数 1
4
回答
copy
vs
std
::move for int
、
、
在示例中,default
copy
和
std
::move有什么区别?在move对象之后,新旧对象之间有依赖关系吗?int main () {
std
::cout<<&a<<
std
::endl;
std
::cout<<&a_
copy
<&
浏览 42
提问于2015-01-11
得票数 33
回答已采纳
1
回答
对`
std
::back_inserter()`使用` `
std
::
copy
()`
、
、
、
std
::vector<
std
::vector<
std
::vector<size_t>>> grid; ...
std
::vector<
std
::vector<
std
::vector<size_t>>> grid;我发现当我使用
std
::
copy
()从A::grid复制到B::grid时,它会失败。j = 0; j < GetSetting(
浏览 7
提问于2017-02-02
得票数 10
回答已采纳
3
回答
我自己的
copy
()函数与
std
::
copy
()冲突
我在这个网站的上看到地图包含一个using
std
::
copy
,所以我猜它会与之冲突。 我不能对复制函数进行任何更改,所以有没有办法在这个头文件中使用map?(没有其他地方)。
浏览 0
提问于2012-03-23
得票数 0
回答已采纳
2
回答
std
::
copy
/memcpy/memmove优化
、
、
、
我研究了一下GCC的STL (4.6.1),发现
std
::
copy
()使用了一个优化的版本,以防内置的__is_trivial()计算结果为true。由于
std
::
copy
()和
std
::reverse_
copy
()模板对于复制数组中的元素非常有用,因此我想使用它们。typename TSpec>{ TValue value; }; {
std
浏览 1
提问于2012-01-19
得票数 7
回答已采纳
2
回答
STL
std
::remove_
copy
、
std
::remove_
copy
OutputIterator remove_
copy
为什么输出容器中的前一个内容在我执行remove_
copy
时会被覆盖?,也就是说,当我执行remove_
copy
(a.begin(),a.end(),b.begin(),' ');时,容器b中的前一个内容丢失了,它们被新的内容替换了,为什么会这样?为什么re
浏览 1
提问于2017-11-18
得票数 1
回答已采纳
2
回答
Boost::bind和
std
::
copy
、
、
我正在尝试使用Boost::bind和
std
::
copy
来打印列表列表中的值。显然,我可以使用循环,为了清楚起见,我可能最终会这样做,但我仍然想知道我在这里做错了什么。bind.hpp>#include <algorithm>#include <iostream> ostream_iterator<int> int_ou
浏览 0
提问于2009-08-14
得票数 3
回答已采纳
1
回答
std
.algorithm.
copy
和
std
.digest
、
、
、
当我对
std
.algorithm.
copy
对象使用
std
.digest时,与逐字节使用put时相比,得到了不同的结果。为什么?import
std
.stdio;import
std
.digest.md; foreach (ubyte b; s) { } s.
copy</e
浏览 2
提问于2016-03-14
得票数 5
回答已采纳
2
回答
std
::filesystem::
copy
()和
std
::filesystem::
copy
_file()之间有什么区别?
、
、
、
在这段代码中,
std
::filesystem::
copy
()和
std
::filesystem::
copy
_file()有什么区别?#include <filesystem> { const
std
::filesystem::path dst = "bar.txt";
std
浏览 0
提问于2018-08-20
得票数 5
回答已采纳
2
回答
C++
std
::复制与
std
::uninitialized_
copy
Docs 与算法复制不同,uninitialized_
copy
在本地构造对象,而不仅仅是复制对象.uninitialized_
copy
函数就像库复制函数一样.它假设目标范围包含原始存储,而不是已经保存值的元素。但是,如果在已经包含元素的内存中调用unitialized_
copy
,会发生什么情况呢?我已经试过了,它似乎工作得很好,但我相信有一个很好的理由有两个不同的功能,我想知道这是什么原因。
浏览 6
提问于2020-03-29
得票数 1
回答已采纳
1
回答
std
::uninitialized_
copy
与
std
的区别::收到?
、
std
::uninitialized_
copy
和
std
::
copy
有什么区别,我什么时候应该使用哪一种?
浏览 2
提问于2015-05-11
得票数 51
回答已采纳
1
回答
输出的
std
::
copy
比
std
::cout快吗?
、
std
::vector<int> v{2,4,6,8,10,12,14,16,18,20};
std
::
copy
(v.cbegin(), v.cend(),
std
::ostream_iterator<int>(
std
::cout, " "));这里使用
std
::
cop
浏览 0
提问于2019-10-30
得票数 1
6
回答
正在复制
std
::vector:首选赋值还是
std
::
copy
?
、
、
我有两个向量:...v2 = v1;
std
::
copy
(v1.begin(), v1.end(), v2.begin()); (反之亦然)?
浏览 2
提问于2013-02-20
得票数 76
回答已采纳
3
回答
std
::
copy
与memcpy的效率
、
、
使用memcpy和
std
::
copy
之间的效率损失有多严重 我遇到了这样一种情况,我的系统上的向量实现似乎没有使用连续的内存,这使得我不得不稍后使用
std
::
copy
它的内容,而不是使用memcpy(dest
浏览 0
提问于2011-09-02
得票数 7
回答已采纳
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
Python:序列的copy方法和 copy 模块
python模块-copy
编码,深浅copy
Python:复制之深浅COPY
Excel-Copy-终结篇
热门
标签
更多标签
云服务器
ICP备案
实时音视频
对象存储
即时通信 IM
活动推荐
运营活动
广告
关闭
领券