×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Nov 2006
    Location
    Switzerland
    Posts
    471

    Type conversion problem

    Hello

    I've a variable of the following type:
    Code:
    TReal32 iTestVariable;
    Additionally, I've the following variable:
    Code:
    TBuf<KBufSize256> aInfo;
    Now, I'd like to append the "iTestVariable" to "aInfo" with
    Code:
    aInfo.AppendNum( iTestVariable );
    But: I get a compiler warning: "passing `TReal32' for converting 1 of `void TDes16::AppendNum(TInt64)'".

    How can I convert that correctly? Any suggestions?

  2. #2
    Registered User
    Join Date
    Feb 2007
    Location
    India
    Posts
    1,128

    Re: Type conversion problem

    Quote Originally Posted by patrickfrei View Post
    Hello

    I've a variable of the following type:
    Code:
    TReal32 iTestVariable;
    Additionally, I've the following variable:
    Code:
    TBuf<KBufSize256> aInfo;
    Now, I'd like to append the "iTestVariable" to "aInfo" with
    Code:
    aInfo.AppendNum( iTestVariable );
    But: I get a compiler warning: "passing `TReal32' for converting 1 of `void TDes16::AppendNum(TInt64)'".

    How can I convert that correctly? Any suggestions?
    Hi,

    Try to use below function for Real to string instead of AppendNum(TInt...)

    TInt AppendNum(TReal aVal, const TRealFormat &aFormat) __SOFTFP;

  3. #3
    Registered User
    Join Date
    Nov 2006
    Location
    Switzerland
    Posts
    471

    Re: Type conversion problem

    That works great! Thank you for your help!

Similar Threads

  1. descriptor conversion problem
    By sunny_singh in forum Symbian
    Replies: 3
    Last Post: 2005-09-05, 09:02
  2. Multimedia Converter 2.0 AMR conversion problem
    By Valahul in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2003-09-22, 08:08
  3. nokia 7210 modem via IR doesn't work !
    By oussamaaiadi in forum PC Suite API and PC Connectivity SDK
    Replies: 1
    Last Post: 2003-03-06, 10:46
  4. conversion problem??
    By slipslop in forum Smart Messaging
    Replies: 1
    Last Post: 2002-12-22, 17:53
  5. Problem with Nokia D211 Linux Drivers
    By fiveam in forum Multimodecards
    Replies: 1
    Last Post: 1970-01-01, 02:00

Posting Permissions

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