腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
搜索
关闭
文章
问答
(9999+)
视频
开发者手册
清单
用户
专栏
沙龙
全部问答
原创问答
Stack Exchange问答
更多筛选
回答情况:
全部
有回答
回答已采纳
提问时间:
不限
一周内
一月内
三月内
一年内
问题标签:
未找到与 相关的标签
筛选
重置
1
回答
ostream
问题
所以我在同一个文件中有两个类;在前面提到的一个文件中有ArrayLinkedList和ArrayLinkedListRow,我有一个方法 //Extra code for giving s content}template<class T> frie
浏览 0
修改于2012-03-27
得票数 2
3
回答
为什么
ostream
不能转换为
ostream
?
下面的示例 cout << ( is_convertible<
ostream
,
ostream
>::value ?
浏览 0
提问于2017-03-28
得票数 2
回答已采纳
2
回答
ostream
过载
friend
ostream
& operator<<(
ostream
& os, MyClass& obj);为什么需要写“friend”?
浏览 0
提问于2011-05-27
得票数 0
回答已采纳
1
回答
ostream
过载
我有我的类,例如TEST.h中的测试在TEST.cc中在主测试x中;cout<< x; 我收到错误消息:错误:未定义对测试的引用(std::basic_
ostream
浏览 2
提问于2011-02-11
得票数 0
回答已采纳
3
回答
如何实现'virtual
ostream
& print(
ostream
& out ) const;‘
我在一个抽象类的头文件中找到了这个函数:谁能告诉我这是什么类型的函数,以及如何在派生类中声明它?
浏览 0
修改于2009-07-01
得票数 0
回答已采纳
2
回答
ostream
问题
这是我的代码:但没有:在第一种情况下,程序运行良好,但在第二种情况下,编译器给出了一个错误: main.cc: error: cannot bind ‘std::
ostream
{aka std::basic_
ostream
<char>}’ lvalue t
浏览 4
修改于2014-04-26
得票数 1
回答已采纳
1
回答
继承std::
ostream
我想要定义MyOStream,它公开继承于std::
ostream
。假设我想实现我自己的want。谢谢!
浏览 0
提问于2010-12-19
得票数 3
4
回答
Ostream
<<重载混乱
当你为一个类重载<<操作符时(假设这在SomeClass中被定义为朋友),为什么你们都引用
ostream
并返回该
ostream
呢?
ostream
& operator<<(
ostream
& s, const SomeClass& c) { return s;当
ostream
已经可以通过引用直接修改时,返回
ostream
有什么好处呢?
浏览 3
提问于2011-08-25
得票数 4
回答已采纳
1
回答
错误:不匹配“operator<<”(操作数类型为‘std::
ostream
{aka std::basic_
ostream
<char>}’和‘std::
ostream
{aka std::basic_
ostream
我正在尝试构建Tramonto fDFT包,但是.cpp文件出现了这样的错误: error: no match no‘operator<<’(操作数类型为‘std::
ostream
{aka std::basic_
ostream
}’和‘std::
ostream
{aka std::basic_
ostream
}’)流<< x1。以下是代码:
ostream
& NOXLOCA::Tramonto::PTVector::leftshift(
ostream
&
浏览 2
提问于2022-03-07
得票数 1
2
回答
不知道从std::
ostream
*到std::
ostream
&
B(std::
ostream
&s, A *curr);}; public: ... ...std::
ostream
*astream = func()->stream; ...但是,我在B *env = newmyfile.h:194:2: note: no known conversion f
浏览 3
提问于2013-09-27
得票数 0
1
回答
clang匹配
ostream
<<
该表达式的类型为std::
ostream
。'basic_
ostream
<char, struct std::char_traits<char> > &(*)(basic_
ostream
<char, struct std::char_traits<col:5, col:11> 'std::basic_
ostream
<char, struct std::char_traits<char> >::__
ostream
_t
浏览 12
提问于2018-01-03
得票数 2
1
回答
重载
ostream
<<算子
我有一个不变的头:{ friend
ostream
& operator<<(
ostream
&, Foo&);我试图像这样实现操作符:using namespace std;
ostream
& operator<<(
ostream
& a,
浏览 0
提问于2015-11-01
得票数 0
1
回答
std::
ostream
to QDataStream
friend std::
ostream
& operator << (std::
ostream
& out, const MyClass& Obj);就像这样。你的帮助将不胜感激。
浏览 2
提问于2013-12-02
得票数 2
回答已采纳
1
回答
NSCoding与
ostream
我需要通过一个C++ std:
ostream
类对象来分发对象,这样才能将对象放到另一台计算机上。帮不了我,因为存档到XML并不能很好地通过
ostream
。-S!
浏览 0
修改于2010-04-23
得票数 0
回答已采纳
1
回答
std::
ostream
{又名std::basic_
ostream
<char>} i值为'std::basic_
ostream
<char>&&
在这段代码中,我尝试将迭代器移动10个元素。 #include <string> int main() using namespace std; auto mid = v.begin() + 10; 在运行这段代码时,我得到标题中提到的错误。我是个初学者。我几乎在我写的每个程序中都会遇
浏览 0
提问于2013-07-01
得票数 2
回答已采纳
1
回答
过载
Ostream
算子
我发现当我在类或结构中创建
ostream
运算符时,它只接受一个参数,而第二个参数是这个指针,所以我尝试这样做,但是它没有工作。x,y ; { y = ay ; std::
ostream
& operator<< (std::
ostream
& stream ) return stream <<this->x<
浏览 0
提问于2021-05-20
得票数 0
回答已采纳
1
回答
子对象上的
ostream
获取其父对象的
ostream
& os ) const; int positionY;}; os << "[" << positionY <&l
浏览 0
提问于2015-05-20
得票数 0
1
回答
错误:无法将'std::
ostream
{aka std::basic_
ostream
<char>}‘lvalue绑定到'std::basic_
ostream
<char>&&’
我尝试超载
ostream
operator <<,并发现自己有一些问题要解决。首先,像
ostream
& operator<<(
ostream
& outs, const Test&);那样执行重载带来了一个被描述为\src\Test.h:15:48: error: 'std::
ostream
& test::Test::operator<<(std::
ostream
&, const test::Test&)'
浏览 25
修改于2022-03-24
得票数 0
1
回答
ostream
定义错误
在做一些重构时,在类的成员函数中移动一些代码后,我得到了一个错误:std::filebuf fileBufferstd::endl;file.cpp:417: error: calling a protected constructor of class 'std::__1::basic_
ostream
<char>' std::
ostream
l
浏览 0
修改于2016-03-12
得票数 0
1
回答
:
ostream
& operator<<( std::
ostream
&,const &)未被覆盖
偶尔,我会编写一个类(T ),并尝试重写std::
ostream
& operator<<(std::
ostream
&,const &),但它不适用于某些类。& operator<<(std::
ostream
& output, const ConfigFile& c) { Stats() {}; #if defined(_DEBUG) |
浏览 1
修改于2011-07-02
得票数 1
第 2 页
第 3 页
第 4 页
第 5 页
第 6 页
第 7 页
第 8 页
第 9 页
第 10 页
第 11 页
点击加载更多
领券