previous
|
index
|
next
Defining a Simple list Type
Since a list is made out of items, define a struct called
listItem
where:
The first member holds an integer
The second member holds a pointer to a struct like itself
struct listItem { int item;
// like the CAR of a list
listItem* rest;
// like the CDR of a list
};
previous
|
index
|
next