Kompetensi : LIST
#3.
Kompetensi 5
1. // Latihan Kompetensi 5:: LIST 2. // File : Lat5_Listke1.cpp 3. #include <iostream.h>
9. list<int>::iterator pos; //Menggunakan iterator sebagai penunjuk pointer element List<int> 10.
20. system("PAUSE"); 21. return 0;
22.}
Kompetensi 5 : Iterasi
•
Pointer pos
Kompetensi 5
1. // Latihan Kompetensi 5:: LIST 2. // File : Lat5_Listke1.cpp
3. #include <iostream.h> 4. #include <list.h>
5. int main() 6. {
7. list<int> coll; // list container for integer elements
8. list<int>::iterator pos; //Menggunakan iterator sebagai penunjuk pointer element List<int> 9. // append elements from 1 to 20
10. // baris 11 sd 13 untuk membentuk List dan isinya ... 11. // Print info pada seluruh node dari struktur List coll