腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(9999+)
视频
沙龙
1
回答
错误
:
将
‘
const
Flacon
’
作为
‘this’
参数
传递
会
丢弃
限定符
[-
fpermissive
]
volume(volume), pH(pH) {} friend ostream& operator<<(ostream&,
const
Flacon
&); sortie << nom << " : " << volume<<
浏览 4
提问于2020-04-29
得票数 1
回答已采纳
1
回答
错误
:
传递
'
const
…‘
作为
“…”的“这个”论点在调用方法中
丢弃
限定符
、
我
将
一个对象的引用
传递
给一个函数,并使用
const
表示它是只读方法,但是如果我在该方法中调用另一个方法,即使我没有
将
引用
作为
参数
传递
,也会发生
错误
。
错误
:
将
'
const
‘
作为
'void::hello()’的'this‘
参数
传递
,
丢弃
限定符
-
fpermissive
浏览 2
提问于2014-11-17
得票数 3
回答已采纳
3
回答
错误
:
传递
'
const
…‘
作为
“…”的“这个”论点抛弃
限定符
错误
:
将
'
const
‘
作为
'void::hi()’的'this‘
参数
传递
,
丢弃
限定符
-
fpermissive
}; {
浏览 5
提问于2014-11-16
得票数 81
回答已采纳
2
回答
operator<<重载“
错误
:
传递
‘
const
.”
、
ofstream& operator<<(ostream &outStream,
const
EventClass &eventObject) outStream << eventObject.getEventName当我编译我的代码时,我会得到以下
错误
:
错误
:
将
‘
const
EventClass’
作为
‘std::string EventClass::getEventName()’的‘this’
参数
传递
浏览 1
提问于2016-04-06
得票数 1
2
回答
使用指针访问cpp中的私有值
、
for (std::vector<Document>::
const
_iterator it = v.begin(); it != v.end(); ++it) cout << it->getName() << endl;}
错误
:
将
'
const
文档‘
作为
'void::getName()’的'this‘
参数
传递
,<
浏览 5
提问于2014-02-21
得票数 0
回答已采纳
1
回答
如何删除c++中的允许
错误
?
、
、
、
传递
‘
const
IntBag’
作为
‘this’
参数
丢弃
限定符
-
fpermissive
> int IntBag::operator[](int index){:$ g++ intbag.cpp intbag.cpp:在复制构造函数‘IntBag::IntBag( constructor &)’:intbag.cpp:19:16: error:
传递
‘
const
IntBag’
作为</
浏览 2
提问于2021-02-04
得票数 0
1
回答
不使用此方法从
const
对象调用非
const
成员函数,为什么这是一个
错误
?
、
在g++中运行下面的代码
将
导致以下
错误
: void f(){};
const
A a; return 0;我们在哪里使用this 不允许意味着代码是不符合的。标准在哪里声
浏览 2
提问于2020-11-12
得票数 2
回答已采纳
3
回答
"*&“在一起意味着什么?
、
public: return curr; return curr == other.getCurr();我在这段代码中有
错误
:
传递
‘
const
’
作为
‘Node*&Iterator::getCurr()’的‘this’
参数
,
浏览 4
提问于2013-04-16
得票数 3
回答已采纳
7
回答
将
const
T*
const
转换为T*
、
、
private:} public: a_->update(); /* Error */private:}
浏览 26
提问于2014-03-28
得票数 1
3
回答
无法从QRect修改高度值
、
、
下面的代码片段导致我的编译产生“
错误
:
传递
'
const
QRect‘
作为
'void QRect::setHeight(int)’的'this‘
参数
丢弃
限定符
-
fpermissive
”。我还注意到,如果我
将
h -= 80;替换为h--;,编译器不会报错。
浏览 30
提问于2013-05-20
得票数 1
回答已采纳
7
回答
“this”指针如何用作成员函数的
参数
我有个简单的课程public: void func2();voidfoo::func2() {}
const
foo f; f.func2();当我试图编译时,我会收到以下消息:
错误
:
将
‘
const
’
作为
‘void::func2 2()’的‘this’
参数</e
浏览 1
提问于2013-04-23
得票数 1
5
回答
将
const
对象引用
传递
给函数的c++
、
、
错误
:
将
'
const
QByteArray‘
作为
'QByteArray& QByteArray::append(
const
&)’的'this‘
参数
传递
,
丢弃
限定符
-
fpermissive
。由于在
传递
函数
参数
时使用对象
const
是一种惯例,所以我已经这样做了。但是现在我得到了一个
错误
!!,我不想使函数
浏览 9
提问于2012-02-17
得票数 0
回答已采纳
2
回答
抛弃
限定符
c++
、
我有一个“范”类,它具有这样的功能:我想在课堂之外的另一个函数中使用它: std::stringstreamss; } ..\mtm_ex4.cpp:37:52:
错误
:
将
'
const
mtm::
浏览 2
提问于2014-01-19
得票数 2
回答已采纳
3
回答
将
boost::fusion::for_each应用于具有可变函数对象的boost::fusion::vector
、
、
boost/fusion/algorithm.hpp> template <class T> void operator()(
const
\include\boost\fusion\algorithm\iteration\detail\for_each.hpp:77:
错误
:
将
'
const
A‘
作为
'void A::operator()(
const
T&a
浏览 9
提问于2013-02-26
得票数 2
回答已采纳
1
回答
为什么我不能将类的常量实例与同一类的非常数实例进行比较呢?
、
、
、
、
我的职能如下:using int_32 = int32_t; {bool operator == (
const
Coord<T> &p) if (this -> x == p.x && return 1;} 它给了我一
浏览 2
提问于2020-08-10
得票数 1
回答已采纳
1
回答
如何解决"
const
::MacHeaderBase“
作为
‘this’
参数
丢弃
限定符
[-
fpermissive
]的
错误
、
morebit; } auto packet = currentTxFrame->dup(); DestAddr = hdr->getDestAddr();但是,我收到了
错误
:
传递
‘
const
::MacHeaderBase’<em
浏览 3
提问于2020-07-28
得票数 0
回答已采纳
3
回答
传递
‘此
参数
放弃
限定符
[-
fpermissive
]
、
我有一个类Cache,它的函数写为我是这样称呼这个函数的。
const
Cache *this_cache;c->write(memory_access,cl);“
将
‘Cache’
作为
‘bool::bool(
const
&,CacheLine&
浏览 3
提问于2012-05-26
得票数 42
回答已采纳
1
回答
在C++中通过迭代器变异合集
、
list<int>> out = {{1, 2, 3}, {6, 7, 8}}; {} 我模糊地认识到,这种情况可能
会
放弃某些康斯特限定词。
浏览 0
提问于2019-02-23
得票数 4
回答已采纳
2
回答
将对象变量
作为
const
..&
传递
、
我有一个函数看起来像它在这里被称为 bigint result;} 我得到了以下编译
错
浏览 0
提问于2014-04-23
得票数 0
回答已采纳
1
回答
传递
'
const
QVariant‘
作为
'this’
参数
丢弃
限定符
[-
fpermissive
]
、
、
value = QVariant(myQLineEdit->text()); }parameters是QList<StorageConfig>parameters.at(j).value = QVariant(myQLineEdit->text())
浏览 0
提问于2017-06-10
得票数 3
回答已采纳
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
C+:02-命名空间
流式编码体验:CPP智能成员列表拉取
【每周一库】-mockall 对象模拟库
C语言编程经验
C+编程学习中的重点难点总结——类和对象
热门
标签
更多标签
云服务器
ICP备案
实时音视频
对象存储
即时通信 IM
活动推荐
运营活动
广告
关闭
领券