I've been having major problems getting a Char** variable to work correctly.
I've tried allocating memory in a number of different way, and had no luck.
This
is the code I am currently trying. During the loop the Emulator throws up
memory
access non-fatal errors, but depending on how many values I put in I get
fatal errors
later on. When I exit the program a bus error (accessing non-even location)
is thrown
up. I am pretty sure the code I use later is correct, as with other
definitions the place
the error is thrown changes.
Any help would be much appreciated.
JD



#define RETURN_WORDS 4
...
    Char **list;
    Char *listRow;
...
     listRow = MemPtrNew((StrLen(info)+1) * RETURN_WORDS);
     list = MemPtrNew(RETURN_WORDS);
     for (i=0;i<RETURN_WORDS;i++)
        list[i]=listRow + ((StrLen(info) +1)*i);         //line that causes
errors.





-- 
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