[
next
] [
prev
] [
prev-tail
] [
tail
] [
up
]
1.4.1
Basic
list in STL is bidirectional list(double-linked), in C++11, you can use forward_list as single-linked list.
CreateList, DeleteList, Length, InsertItem, DeleteItem,
Declaration of Linked list.
//
C
struct
node
{
int
a
;
struct
node
*
link
}
;
//
C
++
Template
<
class
T
>
Class
ChainNode
{
friend
Chain
<
T
>;
T
data
ChainNode
<
T
>
*
link
;
}
template
<
class
T
>
class
Chain
{
......
ChainNode
<
T
>
*
head
;
}
[
next
] [
prev
] [
prev-tail
] [
front
] [
up
]