Namespaces
Variants
Actions

How can I convert the contents of TBuf to TInt?

Jump to: navigation, search



Article Metadata

Compatibility
Platform(s): S60 1st 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);

This page was last modified on 14 June 2012, at 08:51.
79 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved