×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Nov 2005
    Posts
    3

    Unhappy convert TUint to TDesC

    hi everybody,

    i am new in symbian and have problem with some basic rule.

    e.g.
    how is it possible to convert TUint to TDesC?

    i want to write aKeyEvent.iCode to the console but return type is TUint and i need TDesC?

    How can i do this?

    need help!Thanks for all answers!

  2. #2
    Regular Contributor
    Join Date
    May 2003
    Location
    Nice, France
    Posts
    123

    Re: convert TUint to TDesC

    Classic way:

    TBuf <50> aString;
    aString.Num(TInt(theValue));

    Or you can use the Format method for easier "console" string handling:

    _LIT(KFormatString, "Error : %d");
    TBuf <50> aString;
    aString.Format(KFormatString, theValue);

    Daniel

Similar Threads

  1. how should i convert from TDes8 to TDesC
    By rahulchavan_2000 in forum Symbian
    Replies: 8
    Last Post: 2008-05-31, 15:29
  2. Replies: 2
    Last Post: 2006-01-07, 01:39
  3. Replies: 4
    Last Post: 2005-03-23, 21:26
  4. How can I convert char* to TDesC or vice versa
    By hjh770107 in forum Symbian
    Replies: 1
    Last Post: 2004-10-31, 18:43
  5. How to convert TBuf8 to TDesC?
    By da01643 in forum Symbian
    Replies: 3
    Last Post: 2003-10-06, 08:20

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •