腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(9999+)
视频
沙龙
1
回答
c++
不理解
string
::
iterator
的
语法
、
、
我遇到了这样
的
代码: vector<
string
> split_
string
(
string
input_
string
) { return x == y and x
浏览 37
提问于2019-10-16
得票数 0
回答已采纳
5
回答
更简单
的
C++
STL迭代器实例化
、
是否有方法在
语法
上缩短/简化
C++
中
的
迭代器声明。通常我会:vector<pair<
string
, int> >::
iterator
i;vector<pair<
string
, int> > v; magic v::
iterator
i;
浏览 5
提问于2014-10-11
得票数 6
回答已采纳
1
回答
如何理解这个代码片段中
的
两对括号?
、
此代码来自
C++
引物p.446:我
不理解
带有两对括号
的
返回表达式。书前没有类似的
语法
。
浏览 2
提问于2016-10-13
得票数 44
回答已采纳
2
回答
通过std::transform将std::映射到集合
、
、
、
、
我需要将容器从std::map<int, std::set<std::
string
>>压平到std::set<std::
string
>,并且在
语法
上遇到了困难。当我说“扁平化”时,我基本上想要把所有的集合拼接在一起做一个std::set<
string
> ( set将防止重复
的
条目--这正是我所需要
的
),我尝试
的
是基于这个中
的
答案
的
东西,但是我
的
值类型是一个容器我
浏览 2
提问于2016-12-08
得票数 0
回答已采纳
1
回答
算法不适用于非常数对象
的
const_
iterator
我正在从这本名为Accelerated
C++
的
书中学习
C++
。一个章节有这个函数"split“,它接受从”getline“中读取
的
字符串,并返回一个用分隔
的
单词填充
的
向量。vector<
string
> split(
string
s) vector<
string
> ret; typedef
string
::const_
iterator
iter;
浏览 17
提问于2019-11-16
得票数 0
回答已采纳
2
回答
类型定义
的
声明
语法
理解?
我遇到了这段代码,不知道它是做什么
的
。你能破译它吗?我
不理解
的
部分是地图
的
价值。我很惊讶它
的
有效
c++
语法
。 谢谢。
浏览 0
提问于2013-06-20
得票数 3
回答已采纳
2
回答
为什么我会得到"Expected ;“错误和"Variable not in scope”错误?
我有以下代码#include <set>using namespace std; void print(const Container &c) for (itr=c.begin();itr!=c.end();itr++){ cout<<*itr<<
浏览 1
提问于2010-09-19
得票数 1
回答已采纳
4
回答
解决列表中
的
C++
类模板错误
、
、
、
我已经创建了这个squareList类,当我编译它时,它给了我很多错误,我不知道有人能帮我解决这些错误更新:我在~square_list(){}之后注释我所有的代码,以及列出数据
的
每个错误定位; typedef std::reverse_
iterator
<const_
iterator
>:
语法
错误:缺少“;
浏览 5
提问于2014-02-17
得票数 0
回答已采纳
1
回答
为什么指向通过值传递
的
字符
的
指针找不到空终止符?
、
、
、
首先,我让用户输入一个使用cin.getline()读取
的
短语char* inputString = nullptr; cin.getline(inputString,
STRING
_MAX, '\n'); for (char*
iterator
浏览 1
提问于2011-12-03
得票数 1
回答已采纳
1
回答
如何修复错误java.util.NoSuchElementException
下面给出
的
代码给出了错误( java.util.NoSuchElementException)如何修复它 null.Example(s):If 获取以给定字符串开头
的
字符串。如果给定字符串不存在,则应返回包含"hello“和"world”
的
a ArrayList行,并调用getNextStringStartsWith("hello"),我们将得到字符串。字符串getNextStringStartsWith(
String
){
Iterator
迭代器= lines.
浏览 1
提问于2022-01-06
得票数 -1
回答已采纳
2
回答
向量构造函数
、
(std::istream_
iterator
<std::
string
>(ss), std::istream_
iterator
<std::
string
>()); std::
string
deciphered<char> >(std::istream_
iterator
<std::__cxx11::basic_
string
<char> >, std::istream_
iterator
&
浏览 4
提问于2021-12-20
得票数 2
回答已采纳
2
回答
C++
中
的
模板代码块?
、
、
最近我在做一个项目,这个项目需要很多
的
构造,比如“重复”和“预见”。我知道
C++
中没有这样
的
构造,但我试着想象它们
的
样子。repeat(count) ...{}template<unsigned count> repeat(unsigned co
浏览 3
提问于2013-06-02
得票数 1
3
回答
std::矢量迭代器不兼容
、
、
在我
的
C++
程序执行过程中,我遇到了一个我
不理解
的
错误(矢量迭代器不兼容)。(Windows / Visual
C++
2008学习版)#include <vector> {public= myBs->end(); ++it_B) std::vector<A*>::const_
iterator
浏览 5
提问于2010-10-22
得票数 1
回答已采纳
3
回答
“在实例化... required ... required from here”和“没有命名
的
类型...”在std::stable_sort中
#include <iostream>using namespace std;{ cin+/11.1.0/bits/stl_algo.h:5008:9: error: no type named 'value_type' in 'struct std::
iterator
_traits<char+/11.1.0/bits/stl_al
浏览 174
提问于2021-07-04
得票数 1
2
回答
如何使用const_
iterator
编译一个更有效
的
程序?
我理解使用const和&以及所有其他花哨
的
C++
东西,就像我在视频中听到Bjarne所说
的
那样,“帮助编译器”。我理解在可能
的
情况下使用& (引用)如何帮助提高程序
的
效率,但我
不理解
的
一件事是const_
iterator
是如何起作用
的
。in 2016"; for (std::
string
::const_
iterator
i1(s.cbegin()), i2(s.ce
浏览 8
提问于2014-11-21
得票数 2
回答已采纳
2
回答
如何使用迭代器和find/ find _f在类
的
c++
向量中查找实值
、
、
、
、
我有一个类对象
的
向量,命名
的
Items。每个项目都有一个值,比如名称、价格等。在Items类中,有一些setter和getter来更改和返回值。std::
string
choice; // users choice // the(见下文(还没有编译,只是快速地输入给你一个想法)),它会起作用,但肯定有更好
的
方法,对吧?std::
strin
浏览 0
提问于2011-12-05
得票数 0
回答已采纳
2
回答
不合格使用
的
锈菌进口性状
、
我最近一直在学习Rust,我更喜欢调用函数
的
语法
,而不是方法。我刚刚发现了通用函数调用
语法
,它提供了我正在寻找
的
东西。我可以把这条链子:转入: 0.0, |sum, (
浏览 0
提问于2019-07-26
得票数 2
2
回答
Concatenating字符串
、
、
、
、
我如何连接两个const_
string
?它
的
主页说:typedef class boost::const_
string
<char> csc;csc c = a+b;/usr
浏览 3
提问于2011-04-29
得票数 0
回答已采纳
8
回答
如何将
C++
字符串转换为大写
、
、
我需要将
C++
中
的
字符串转换为完全大写。我已经搜索了一段时间,找到了一种方法:#include <algorithm> return 0;不幸
的
是,这不起作用,我收到了以下错误消息: 没有调用“转换”
的
匹配函数( std::basic_
string
浏览 10
提问于2014-05-01
得票数 35
回答已采纳
1
回答
NSMutableArray到性病::载体
、
、
、
、
是否可以将NSMutableArray
的
内容转换为std::NSMutableArray?如果是这样的话,应该在目标C或
C++
代码中这样做吗?
浏览 1
提问于2017-06-18
得票数 2
回答已采纳
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
C+实现xml解析器
集合框架
TeamViewer 13.0.5058中的权限漏洞测试
Rust从0到1-高级特性-Traits 进阶
Netty搬运工 NIO之demo
热门
标签
更多标签
云服务器
ICP备案
实时音视频
即时通信 IM
对象存储
活动推荐
运营活动
广告
关闭
领券