22 October 2005

How to convert TInt64 to string on Symbian?

Sometimes you need to display some TInt64 on screen so you need to convert it to string representation. But unfortunately you can’t display it using Format() function of Symbian descriptors. What to do? You have to use functions AppendNum() or Num() which can take as parameter TInt64. Code will look like this:

    TInt64 n = 123456789;
    TBuf<64> tInt64;
    tInt64.AppendNum( n );
    tSomeString.Format( “I have this value - %S”, &tInt64 );

No comments: