![]() |
| | #1 |
| Registered User Join Date: Jun 2003
Posts: 147
| Linked Lists & Pointers I have to implement these concepts intot hte homework, whereby I have to accept data (about a student's profile, like name, age, and such...) and then print them out. I have created structures for the profile details. For example, last name and first name come under the Struct Name and so forth. However, I really need ideas on how to achieve utilising pointers. Can someone give me fresh new ideas? Also, I have been reading a tutorial on single linked list, and happened to come across some keywords I'm not famliar with. What is assert( ) for? Also, what is this variable type for ( i keep seeing it ) "size_t ? What is memcpy()?
__________________ Only by the cross are you saved... |
| fkheng is offline | |
| | #2 |
| Just Lurking Join Date: Oct 2002
Posts: 4,990
| >What is assert( ) for? http://www.embedded.com/story/OEG20010311S0021 http://www.embedded.com/story/OEG20010416S0090 >Also, what is this variable type for ( i keep seeing it ) "size_t ? It "is the unsigned integer type of the result of the sizeof operator". >What is memcpy()? memcpy
__________________ 7. It is easier to write an incorrect program than understand a correct one. 40. There are two ways to write error-free programs; only the third one works.* |
| Dave_Sinkula is offline | |
| | #3 |
| .... Join Date: Aug 2001 Location: Groningen (NL)
Posts: 2,386
| Here's a C reference: http://www.acm.uiuc.edu/webmonkeys/book/c_guide/ |
| Shiro is offline | |
| | #4 |
| Registered User Join Date: Jun 2003
Posts: 147
| ok, hm......wat is the difference between these 2 then? assert(Item != NULL) and if (NULL == *Item) ? Assuming Item is a pointer variable for a struct
__________________ Only by the cross are you saved... |
| fkheng is offline | |
| | #5 |
| C++ Developer Join Date: Jun 2002 Location: UWaterloo
Posts: 2,718
| Item != NULL is true if Item is pointing to a memory location. NULL == *Item is true if the data pointed to by Item is NULL.
__________________ Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie |
| XSquared is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Doubly linked lists | mohanlon | C Programming | 7 | 06-27-2009 07:45 PM |
| Linked Lists | wvu2005 | C Programming | 12 | 10-06-2005 11:36 AM |
| Linked Lists 101 | The Brain | C++ Programming | 5 | 07-24-2004 04:32 PM |
| eof in fstream & singly linked lists | mazo | C++ Programming | 3 | 06-03-2002 09:50 AM |
| Linked lists and file i/o, and some other stuff | ninja | C++ Programming | 9 | 05-19-2002 07:15 PM |