Change it to:

         theList [i] = (char*) MemPtrNew (1);

This just explicitly typecasts the void* pointer into a char* pointer, which 
is what you want.

--
Tim Kostka


"Andre Augusto" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Hello everybody!
> I'm trying to construct a list with a scrollbar. But there's something 
> wrong with my code! In the marked line, I get an error saying
> "illegal implicit conversion from 'void *' to char *". I can I solve this 
> problem? I'm programming in C++, with Codewarrior v9.
> Thanks everybody!
> Andr� Augusto
>
>
> linesInList = bounds.extent.y / FntCharHeight ();
> theList = (Char **) MemPtrNew (linesInList * sizeof (Char *));
>
> for (i = 0; i < linesInList; i++)
>            {
>                theList [i] = MemPtrNew (1); 
> <---------------------------------
>                if (! theList [i])
>                {
>                    FrmCustomAlert (ErrorAlert, "????????", "Cannot get 
> list member memory pointer.", "Out of memory?");
>                    return true;
>                }
>                theList [i] [0] = 0x00;
>            }
> 



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

Reply via email to