Using a pointer to QTextStream segfaults my app
Okay I'm in a tricky spot here.
I have a class for handling a KTextEditer, QTStream and misc other things.
The problem is though that there are two ways to implement file writing
support.
1: Write into the class's private section that there is a stream and then initialize
the stream in the class's constructor. This won't compile with g++.
2: In the class constructor Declare the stream and have in the private section
a pointer (which is then given the address of the real stream in the constructor.
This seamed good in theory but the line: streamPtr->operator<<( editField->text() );
caused a seg fault.
Can somebody explain the correct approach please?
---
Iwasapenguin