当对象是类成员时,QFile init / assignment op问题

时间:2017-05-05 17:10:52

标签: c++ qt qt5 qfile qtextstream

所以我有一个QFile和QTextStream成员作为我班级的一部分...尝试初始化。他们在我的构造函数中一起:

Class.h:

QFile _file;
QTextStream _textstrm;

Class.cpp:

_file = QFile (/*file name*/);
_file.open(/*set stuff*/);
_textstrm = QTextTream ( &_file );

我得到的comp错误C2248表示可以访问自己类中的运算符的对象。

0 个答案:

没有答案
相关问题