I must rephrase my question, it was a little misleading. If not only
displaying a number in the console is necessary, which can be handled by
"<<" but I want to display it elsewhere, say in a TText, I need to
convert it to a char*.
I thought about using stringstreams but my previous experience shows that CINT is not capable of using stringstreams (I send a mail regarding a related issue a few days ago).
There are severe, random performance drops with using stringstream members such as clear( ). On a plain simple istringstream it takes almost a second to finish - it's impossible for me to determine why.
Then, using a stringstream to just perform such a simple task as displaying a float appears to me like a overhead - given that I'll eventually have to convert it to a CString again.
snprintf is actully just the right candidate for the job, but CINT doesnt appear to know it.
Cedric
James Jackson wrote:
> Surly std::cout << myNumber; will do the trick? > > Or you could use a stringstream, I've used that in CINT before. > > Regards, > James. > > On 5 Apr 2010, at 11:56, Cedric Sodhi wrote: >
This archive was generated by hypermail 2.2.0 : Mon Apr 05 2010 - 17:50:01 CEST