CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: C++ for Palm OS

  1. #1
    Join Date
    Oct 2002
    Posts
    12

    C++ for Palm OS

    hi........anyone here knows about C++ programming for Palm OS (Code Warrior)???........I have just started to learn about it.......now I am particularly focus on the database construction in Code Warrior........here's how it looks like:

    #define CREATORID 'john_Woo'
    #define DBTYPE 'Data'
    #define DBNAME 'my_Data'

    Err err = DmCreateDatabase( 0, DBNAME, CREATORID, DBTYPE, false );

    when I compile it I got this error:

    "error: illegal implicit conversion from 'unsigned long long' to 'const char *'"

    this error appears to be from the last parameter I passed into the DmCreateDatabase(). Since the Code Warrior 8.0 didn't provide me any syntax references towards all the syntaxes used in Palm OS programming..........so if anyone can help me with this I would be much more appreciated.....thanks

  2. #2
    Join Date
    Jun 2001
    Location
    Switzerland
    Posts
    4,443
    Code:
    #define CREATORID "john_Woo"
    #define DBTYPE "Data"
    #define DBNAME "my_Data"
    Gabriel, CodeGuru moderator

    Forever trusting who we are
    And nothing else matters
    - Metallica

    Learn about the advantages of std::vector.

  3. #3
    Join Date
    Oct 2002
    Posts
    12
    eh........thanks for reminding......but that don't seems to be the problem here...........the real problem came from the last parameter I passed into the DmCreateDatabase().........it seems to me that the C++ compiler was not able to identify the "false" input (which is a boolean) I have passed in and thus, it generates the error as mentioned before..........so I was puzzled over what kind of data type that parameter actually holds....is it really a bool (as mentioned from the lesson I have learned) or something else???

  4. #4
    Join Date
    Aug 2000
    Location
    West Virginia
    Posts
    7,725
    Are you sure that the problem is the last argument ?

    According to the following link :

    http://www.sdpug.com/PDFs/Instant%20...ons%20Ch11.pdf

    The prototype for DmCreateDatabase() is:

    Code:
    Err DmCreateDatabase(UInt16 cardNo, const Char *nameP, UInt32 creator,
                         UInt32 type, Boolean resDB);
    And the sample call given is:

    Code:
    Status = DMCreateDatabase(0,"FirstData", 'IP99', 'DATA', false);
    so the second argument uses double quotes (you had single quotes in
    your example). Also, since the third and fourth argurments are of
    type UInt32, I assume that they would be limitted to 4 characters
    (Although I really don't know what the types given mean). Your
    example had more than 4 characters for the third argument.

  5. #5
    Join Date
    Oct 2002
    Posts
    12
    Thanks for the link............the resons I am sure about the problem is that the compiler itself has highligted the error came at the closing bracket of the DmCreatedatabase()...........I have tried the ways u have suggested but the problem still persist................is it possible that my compiler setting wrong???

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured