×
Namespaces

Variants
Actions

How can I convert the contents of TBuf to TInt?

From Nokia Developer Wiki
Jump to: navigation, search



Article Metadata
Compatibility
Platform(s): S60 1st Edition
S60 2nd Edition
S60 2nd Edition (initial release)
S60 1st Edition
Article
Created: User:Technical writer 2 (16 May 2003)
Last edited: hamishwillee (14 Jun 2012)

Overview

How can I convert the contents of TBuf to TInt?

Description

Do as follows:
// 15-digcit number
TInt iNum1(123456789009876);
// set the content of the buffer to iNum1
iBuf.Num(iNum1);
// create TLex object using iBuf containing
// the 15 digit number
TLex iLex(iBuf);
// To retrieve value from iBuf and later compare with
// iNum1
TInt iNum2;
//iNum2 contains the 15 digit number now
iLex.Val(iNum2);

This page was last modified on 14 June 2012, at 05:51.
13 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×