[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Help with QString n unexpected behaviour of "cout"
From: "Craig Drummond" <Craig.Drummond () gmx ! net>
Date: 2004-08-16 15:14:58
Message-ID: 27505.1092669298 () www28 ! gmx ! net
[Download RAW message or body]
> 1) I have a string, n I need to convert it into a QString. I am thinking
> about
> using the QString constructor to do the cast...so this is the code I use:
>
> string str;
> QString Str=new QString(const str);
Try just:
string str;
QString Str(str);
>
> 2) Sometimes, the messages which should be outputted by cout, are
> displayed
> only when another successive action begins its work. On the other hand,
> messages outputted by cerr are quite always promptly displayed on the
> konsole
> (which is the stdout n stderr). any idea?
cout is buffered - whereas cerr is not. Try using std::endl, or std::flush.
Craig.
--
NEU: WLAN-Router für 0,- EUR* - auch für DSL-Wechsler!
GMX DSL = supergünstig & kabellos http://www.gmx.net/de/go/dsl
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic