[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: PATCH: replace iostream.h by iostream (kdebase)
From:       Martijn Klingens <mklingens () yahoo ! com>
Date:       2001-12-24 0:32:22
[Download RAW message or body]

On Sunday 23 December 2001 15:56, Michael Ritzert wrote:
> Here comes the kdebase patch. Some more issues here (fstream).

Might be just me, but I prefer using something else in my code:

---
#include <qtextstream.h>
static QTextStream cout( stdout, IO_WriteOnly );
static QTextStream cerr( stderr, IO_WriteOnly );
static QTextStream cin(  stdin,  IO_ReadOnly );
---

(Or whatever I'm using of those three streams.)

Is this portable enough to use instead? Primary reason why I do this is 
because it supports QStrings directly.

But I can imagine it breaks code that expects the real STL cin/cout/cerr, 
which is why I'm asking. Especially in the case of --enable-final when mixing 
with code that uses my approach...

Martijn
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic