Remember that the type of a pointer in C is important. So you really don't
want the compiler to just silently allow assignment of disparate pointer
types, just in case that's not really what you intended. You can either cast
it, as below, or you can declare the pointer as a void * (or more properly a
MemPtr) in the first place. What's wrong with casting that you want to avoid
it? It's a time-honored tradition in C that says, "Ignore that man behind
the curtain."

--Jim Preston


"Renato R. Garcia" <[EMAIL PROTECTED]> wrote in message
news:44850@palm-dev-forum...
>
> Hi,
> in the code below,
>
>    MemHandle testHandle;
>    Char* ptext;
>    testHandle = MemHandleNew (12);
>    ptext = MemHandleLock( testeHandle );
>
> it gives me in the compilation
>     Error   : illegal implicit conversion from 'void *' to 'char *'...
>
> It�s in the 3rd line, right... to work I need to cast it, like :
>     testHandle = (Char*) MemHandleNew (12);
> I�ve seen some examples from books that work without casting...
> I�m working with CW and I�ve already tried to change the projects
> settings->language settings...
>
> Is there any other way to do this ?
>
> Thanks ....
> Renato Garcia
>
>
>
>
>
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to