Thread: Malloc, etc...
View Single Post
  #3   Spotlight this post!  
Unread 04-01-2004, 18:52
rwaliany's Avatar
rwaliany rwaliany is offline
R
None #0691 (HartBurn)
Team Role: Programmer
 
Join Date: Jan 2003
Rookie Year: 2000
Location: http://www.hartrobot.com
Posts: 137
rwaliany will become famous soon enough
Re: Malloc, etc...

Quote:
Originally Posted by Rickertsen2
the documentation on this can be found in the following document:
http://microchip.com/download/tools/...b18/51288b.pdf
Thanks for the link, but can the documentation be found there? If so, I don't see it. They tell you how to use strings, etc... But they do not show you how they're memory allocation for their strings work. I suppose they don't except anyone to use it, so they didn't explain how?

I'm talking about like

typedef struct ptr PTR;

typedef struct
{
int value;
PTR *next, *prev;
} ptr;

.....code
PTR *temp;

how to create memory that is not deleted after the function is executed besides a static declaration, or a global declaration of an array.

I would like to know how to do like , temp = (PTR*)malloc(sizeof(PTR));
__________________
R