how to pass QFile pointer to the QTextStream object
Solved
General and Desktop
-
Hi Guys,
I have declared the QFile pointer and I want to pass it to QTextStream object but it says that the invalid use of incomplete type class QTextStream.QFile *fp=new QFile("file address"); QTextStream txtline(fp);
I did
QTextStream txtline(&fp);
but it did not work for me,
could you help me? -
@thippu said in how to pass QFile pointer to the QTextStream object:
invalid use of incomplete type class QTextStream.
have you included QTextStream ?
#include <QTextStream>
-
-
@thippu said in how to pass QFile pointer to the QTextStream object:
the compiler did not say anything about it?
It did: "but it says that the invalid use of incomplete type class QTextStream"
"incomplete type" means that compiler does not know what QTextStream is, which usually means that the include is missing.