You must be using a C++ compiler? Just do this:
PackedChemical * packedChemical = (PackedChemical *) MemHandleLock (h);
This happens because MemHandleLock() returns (I guess a char *, or maybe
void *).
Anyway, the C++ compiler is saying that it will not automatically convert
it to a PackedChemical * because it has no way of knowing that you really
mean to do that. (C compilers quietly do this automatically, so no error).
So
if you explicitly tell the compiler that Yes, you want to do that, the error
will
go away.
Brandon
----- Original Message -----
From: Nicholas Breau <[EMAIL PROTECTED]>
Newsgroups: palm-dev-forum
To: Palm Developer Forum <[EMAIL PROTECTED]>
Sent: Wednesday, April 05, 2000 12:57 PM
Subject: simple error, need help
> I'm writting my first palm database application, and I'm trying to
populate
> a list with data from a database, when I try compiling the code I get the
> error message on the following line
>
> VoidHand h = DmQueryRecord(gChemicalDB, index);
> PackedChemical *packedChemical = MemHandleLock(h); <-- this line causes
> error
>
> "illegal implicit conversion from Void * to packedChemical *"
>
>
> I'm using an example in the Oreilly book, and it's pretty much the same
> code....
>
> Nick.
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palm.com/devzone/mailinglists.html
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html