Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User eshajari's Avatar
    Join Date
    Mar 2012
    Posts
    40
    Can anyone plz explain me how to merge two values and string in a buffer .
    It doesn't work with buff.operator +=("string");

  2. #2
    Registered User jayesh4456's Avatar
    Join Date
    Dec 2011
    Posts
    142
    Try buffer.append(buffer);

  3. #3
    Registered User eshajari's Avatar
    Join Date
    Mar 2012
    Posts
    40
    had did it. But it did not work to merge the variables value. by its name.

  4. #4
    Nokia Developer Champion vineet.jain's Avatar
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    3,841
    Variables value? what kind of variables?

    Also always post your questions in relevant sections(this one belongs to Symbian c++ section).

  5. #5
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    It may be Java too (perhaps Qt, perhaps even Flash), let us wait until Eshajari tells which platform he is working with.

    Eshajari: it may be a good idea writing a short example about what you want.
    Like "I have int a=5 and String b="string", and I want them to be merged as "string5"."

  6. #6
    Registered User eshajari's Avatar
    Join Date
    Mar 2012
    Posts
    40
    Thank u for reply.
    I have a latitude value and a registration value. Wanna send it to server by merging its value in a single string . but latitude are in different format so cant merge it with the number. Any suggestion to do this possible.

  7. #7
    Nokia Developer Champion vineet.jain's Avatar
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    3,841
    Quote Originally Posted by wizard_hu_ View Post
    It may be Java too (perhaps Qt, perhaps even Flash), let us wait until Eshajari tells which platform he is working with.
    Well i guessed symbian c++ with what was suggested in #2 & she tried

    Regarding appending the lat/long(assuming they are in TReal) to a TBuf:

    const TInt KMaxFolatLength = 15;
    const TInt KDecimalPos = 5;
    TBuf<20>tempLat;
    TBuf<20> tempLong;
    TRealFormat format( KMaxFolatLength, KDecimalPos );
    format.iType = KRealFormatFixed | KDoNotUseTriads;

    tempLat.Num(iLatitude,format);
    tempLong.Num(iLongitude,format);

    Where iLatitude & iLongitude are lat/long in TReal variables. So now you have lat & long in TBuf's & you can append them with other strings.

  8. #8
    Registered User eshajari's Avatar
    Join Date
    Mar 2012
    Posts
    40
    Yes sir I m asking about symbian c++ plateform. and using it by carbide c++.

    Actually wanted it as a TDes formate.

  9. #9
    Registered User jayesh4456's Avatar
    Join Date
    Dec 2011
    Posts
    142
    Try comment #7 as vineet jain has said.
    convert it into TBuf and then append and send to server.

  10. #10
    Registered User eshajari's Avatar
    Join Date
    Mar 2012
    Posts
    40
    Thank u Vineet.jain and Jayesh. Now its Working.

Similar Threads

  1. can we merge the CarbideC/C++ and J2ME
    By PM5249 in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2010-11-24, 07:07
  2. How to merge image?
    By shrawan0786 in forum Geolocation and Navigation
    Replies: 4
    Last Post: 2010-05-03, 08:22
  3. Is it possible to merge two or more DLLs into one?
    By mak_tgi in forum Symbian C++
    Replies: 1
    Last Post: 2009-03-16, 17:19
  4. Merge SIS problem
    By neil.young in forum Python
    Replies: 9
    Last Post: 2008-10-11, 12:23

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
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