display number in note

Login to reply to this topic.
Mon, 2006-04-24 18:37
Joined: 2006-04-23
Forum posts: 45
i want to display a number in a note.
for example if we type *#06# we get the imei number in a note and it stays there as long as we press the ok button.
can anyone please help

Mon, 2006-04-24 20:22
Joined: 2004-05-24
Forum posts: 982
Re: display number in note
use a descriptor to put numbers within it (eg Format) and then use that descriptor in your note  Huh

pirosl

Tue, 2006-04-25 06:56
Joined: 2006-01-09
Forum posts: 105
Re: display number in note
Hi

you have to convert from number to string....

following piece of code would help you..

TInt MyNum = 10;
TBuf<20> MyString;
MyString.Format(_L("Value is %d"),MyNum);
User::InfoPrint(MyString);


//output : Value is 10


Cheers!!
CodePupil

Thanks and Regards
CodePupil
__________________________
You are I and I am he .. !!

Wed, 2006-04-26 05:39
Joined: 2005-09-16
Forum posts: 141
Re: display number in note
Hi,

Another option is,

TBuf<15> buf;
buf.Num(IMEI);
CEikonEnv::Static()->AlertWin(buf);
Mon, 2006-05-01 14:38
Joined: 2006-04-19
Forum posts: 155
Re: display number in note

TInt MyNum = 10;
TBuf<20> MyString;
MyString.Format(_L("Value is %d"),MyNum);
User::InfoPrint(MyString);


//output : Value is 10


Hi

I tried this one but I m getting the error on emulator i.e. User 11.

Pls help me out.

Regards
Isha

"To the question of your life , you are the only Answer. To the problems of your life,you are the only Solution".

Mon, 2006-05-01 14:54
Joined: 2006-01-09
Forum posts: 105
Re: display number in note
Hi

it is tested code...
please check whether you cross descriptor's limit...
viz. TBuf<20> MyString;

MyString can't hold string having length greater than 20...
please check this out....and let me know...


Cheers!!
CodePupil


Thanks and Regards
CodePupil
__________________________
You are I and I am he .. !!

  • Login to reply to this topic.