Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User geobabu's Avatar
    Join Date
    Mar 2009
    Posts
    2
    [FONT="Arial Narrow"]Hi ,
    I am a newbie to this,I was trying to format a string using Format(I read its the equivalent to the sprintf).But some where i got an error. Please guide me to solve this error, while looking to the code. Whether I had any mistake in its method.[/FONT]

    Code:
    typedef struct _PARSEGPGGA
          {
    	TUint satTime;
    	TReal64 latitude;
    	TChar latDir;
    	TReal64 longitude;
    	TChar longDir;
    	TInt8 gpsQuality;
    	TInt8 noOfSat;
    	TInt8 hzonDilution;
    	TReal32 altitude;
    	TChar altUnit;
    	TReal64 ellisoidSep;
    	TChar ellipUnit;
           } PARSEGPGGA;
           		
           PARSEGPGGA ggaData;
    ........................
    ..........
    _LIT(KGPGGA,"$GPGGA,%u,%f,%c,%f,%c,%d,%d,%d,%f,%c,%f,%c,,,\n");
    
    .........
    ........
    TBuf8<200> GpsBuff;
    
    GpsBuff.Format(KGPGGA,ggaData.satTime,ggaData.latitude,ggaData.latDir,
                 gaData.longitude,ggaData.longDir,ggaData.gpsQuality,
             ggaData.noOfSat,&ggaData.hzonDilution,&ggaData.altitude,
    	ggaData.altUnit,ggaData.ellisoidSep,ggaData.ellipUnit);
    
    .........
    .........
    while compiling I got one error

    1245700729296 error: no matching function for call to `TBuf8<200>::Format(const TLitC<47>&, TUint&, TReal64&, TChar&, TReal64&, TChar&, TInt8&, TInt8&, TInt8*, TReal32*, TChar&, TReal64&, TChar&)'

    Please help me to solve this.
    Thanks in advance
    Geo

  2. #2
    Nokia Developer Champion kkrish's Avatar
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,029
    Hi,

    _LIT(KGPGGA,"$GPGGA,%u,%f,%c,%f,%c,%d,%d,%d,%f,%c,%f,%c,,,\n");
    The above line should be like
    _LIT8(KGPGGA,"$GPGGA,%u,%f,%c,%f,%c,%d,%d,%d,%f,%c,%f,%c,,,\n");

  3. #3
    Registered User geobabu's Avatar
    Join Date
    Mar 2009
    Posts
    2
    Hi,
    Yes...really That helped me a lot... thank u...

    Now can we write this buf into a file ....

    .....
    ...
    file.Write(GpsBuff);


    regards,
    geo

  4. #4
    Nokia Developer Champion kkrish's Avatar
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,029
    Hi,

    Yes you can write it into the file also. if you need example you can check wiki.

Similar Threads

  1. Problem in sending encrypted string via CSmsHandler class
    By michaelnewyork in forum Symbian C++
    Replies: 2
    Last Post: 2008-12-25, 12:41
  2. urgent problem: file format unknow for xhtml
    By mingl in forum Browsing and Mark-ups
    Replies: 1
    Last Post: 2006-02-15, 08:16
  3. 9210 Communicator reset or format problem
    By akuroda in forum Symbian C++
    Replies: 1
    Last Post: 2004-08-14, 02:03
  4. A problem about the string and the color
    By wangdongjing in forum Mobile Java General
    Replies: 1
    Last Post: 2004-04-20, 13:03
  5. Sound format problem !!!!!
    By GaryWu in forum Mobile Java General
    Replies: 0
    Last Post: 2002-12-28, 20:03

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