[Qt-interest] I am facing a problem

Murphy, Sean M. sean.murphy at gd-ais.com
Wed Aug 12 17:50:54 CEST 2009


>> I am reading an int and a double from file.
> 
> Ah, so this a *totally different issue* than the one you had before!
> Please start new threads when asking *new* questions.
> 
>> Can u tell me how could I
>> check whether it's an int or double.
> 
> So you are reading a bunch of bytes of "unknown nature". How - in your
> own words and imagination - should *any* function know whether the
> data you read as int or double should be really an int or double? In
other words:

He didn't say whether he's streaming in using a QTextStream or
QDataStream, maybe he's reading from a QTextStream and he wants to know
whether he should read the next value in as an int or float (or junk)
based on the ASCII representation of the number?  

Sean




More information about the Qt-interest-old mailing list