Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

How can I convert the contents of TBuf to TInt?

From Wiki
Jump to: navigation, search

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


How can I convert the contents of TBuf to TInt?


Do as follows:
// 15-digcit number
TInt iNum1(123456789009876);
// set the content of the buffer to 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

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