社区
C++ 语言
帖子详情
求教:在一个类定义中,friend ifstream & operator >> (ifstream &a, CSysConfigGroup &b);这话怎么理解?
eduyu
2006-03-16 06:46:49
-
...全文
125
4
打赏
收藏
求教:在一个类定义中,friend ifstream & operator >> (ifstream &a, CSysConfigGroup &b);这话怎么理解?
-
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
4 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
zh2817
2006-03-16
打赏
举报
回复
友元重载操作符“》”,返回一个ifstream类型的引用
yuanchuang
2006-03-16
打赏
举报
回复
friend ifstream & operator >> (ifstream &a, CSysConfigGroup &b);
友元方式重载>>。
a是输入文件流引用。b是CSysConfigGroup引用,CSysConfigGroup应该是类名。
popoxx
2006-03-16
打赏
举报
回复
friend ifstream & operator >> (ifstream &a, CSysConfigGroup &b);
应该是一个类让一个重载了>>操作符返回一个ifstream类型指针的的函数。
具体功能要看实现了,不过它肯定用到了CSysConfigGroup类的成员。
yinqing_yx
2006-03-16
打赏
举报
回复
重载>>输出CSysConfigGroup类的某些信息?
ifstream
&
operator
>>函数无法获取空行和peek函数的用法
ifstream
&
operator
>>函数无法获取空行 #include #include #include using namespace std; int main() { string str;
ifstream
fin("c:\\1.txt"/*, ios::binary*/); if(!fin.is_open()) { ...
C++用友元函数重载运算符
friend
ifstream
&
operator
>>(
ifstream
& ReadFile, Manage & user); }实现方式
ifstream
&
operator
>>(
ifstream
& ReadFile, Manage &...
怎么解决[Error] no matching function for call to 'std::basic_
ifstream
::basic_
ifstream
(std::string&...
在标准 C++
中
,std::basic_
ifstream
类
的构造函数可以接受
一个
C 风格字符串作为文件名,但是不能接受
一个
std::string 对象。 为了解决这个问题,您可以将std::string对象转换为 C 风格字符串,如下所示: std::...
C++
类
重载写入文件
实现了
一个
Student
类
,并重载其运算符流函数。Student.h文件:#pragma once //vs专用防止头文件二次引用 #include <iostream> #include <string> #include <fstream> ...
【ERROR】no matching function for call to 'std::basic_
ifstream
::basic_
ifstream
错误记录:QT
中
使用 no matching function for call to 'std::basic_
ifstream
<char>::basic_
ifstream
(QString&, const openmode&)'
ifstream
i_f_stream(fileName,
ifstream
::binary); ...
C++ 语言
64,637
社区成员
250,559
社区内容
发帖
与我相关
我的任务
C++ 语言
C++ 语言相关问题讨论,技术干货分享,前沿动态等
复制链接
扫一扫
分享
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++
技术论坛(原bbs)
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
请不要发布与C++技术无关的贴子
请不要发布与技术无关的招聘、广告的帖子
请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下
试试用AI创作助手写篇文章吧
+ 用AI写文章