Data hosted with ♥ by
Pastebin.com
-
Download Raw
-
See Original
#include <iostream>
#include <list>
using
namespace
std
;
int
main
(
void
)
{
list
<
int
>
li
;
li.
push_front
(
4
)
;
li.
push_front
(
2
)
;
li.
push_front
(
1
)
;
li.
push_front
(
3
)
;
li.
sort
(
)
;
//built in sort algorithm
while
(
!
li.
empty
(
)
)
{
cout
<<
li.
front
(
)
;
li.
pop_front
(
)
;
}
while
(
!
li.
empty
(
)
)
{
cout
<<
"Not empty!!"
;
}
return
0
;
}