Help me please ! change " TReal32 " to " TInt " ! Thanks very much !

Login to reply to this topic.
Thu, 2005-09-22 10:03
Joined: 2005-06-21
Forum posts: 107
Hi all!
Please help me to convert " TReal32 " to " TInt " .Thanks very much !
---------------------------------------------------- doctinh113114 ---------------------------------------

Thu, 2005-09-22 13:18
Joined: 2004-06-06
Forum posts: 205
Re: Help me please ! change " TReal32 " to " TInt " ! Thanks ver
check Math class and its Int() function.

Best regards,
Michal Laskowski

Sat, 2005-11-19 11:41
Joined: 2003-10-10
Forum posts: 124
Re: Help me please ! change " TReal32 " to " TInt " ! Thanks ver
You need something like

TReal real = 3.14159;
TInt int=0;

TInt err = Math::Int(intPart, real);
if (err == KErrNone)
{
   TBuf<10> buffer;
buffer.Format(_L("%d"), intPart);
RDebug::Print(buffer)
}   

  • Login to reply to this topic.