peternilsson42 wrote: > "Nilesh Chakraborty" <[EMAIL PROTECTED]> wrote: >> Hi all, >> >> While learning the C language, the most tough part to me, >> is, "Linked Lists" - oh! I just can't understand that >> thing. > > What have you tried? > >> Could anyone, including Mr. Hruska, help me out? Any >> links/guidance would be appreciated. > > http://www.google.com.au/search?q=linked+lists+in+c > > Second hit for me was... > > http://cslibrary.stanford.edu/103/ > > ...which (at a glance) seems to have some useful first > principles info on pointers (complete with pictures > and even videos!)
Ah. Binky. It is unfortunately popular among college professors and students assume that is all there is to pointers. There is also no such term as a "pointee". Please don't call it that, you'll get a lot of blank stares. Or get hurt. Or both. A definition of pointers: Pointers store values that represent locations in memory (RAM). malloc() and 'new' call the underlying OS to allocate a chunk of memory and return a value that represents a location to that newly allocated chunk. I typically call this newly allocated chunk of memory a "chunk of data". A definition of a linked list: As long as the chunk of data is large enough, you could have a pointer and some data stored together and then the pointer could point at another chunk of data. Then that chunk of data could store some data and a pointer with the pointer pointing at another chunk of data. And so on. Hence, a linked list. -- Thomas Hruska CubicleSoft President Ph: 517-803-4197 *NEW* MyTaskFocus 1.1 Get on task. Stay on task. http://www.CubicleSoft.com/MyTaskFocus/
