How can I convert the contents of TBuf to TInt?
Article Metadata
Compatibility
Platform(s): S60 1st Edition
S60 2nd Edition
S60 2nd 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);


(no comments yet)