Kompetensi : Mahasiswa mampu menggunakan rutin yang ada dalam STL C++ #2. 16 Maret 2012
Kompetensi 2, 3 #include int main() { list coll; // list container for character elements // append elements from 'a' to 'z' for (char c='a'; c<='z'; ++c) { coll.push_back(c); } system("PAUSE"); return 0; } Latihan 2-3.1
Kompetensi 2, 3 #include int main() { list coll; // list container for character elements // append elements from 'a' to 'z' for (char c='a'; c<='z'; ++c) { coll.push_front(c); } system("PAUSE"); return 0; } Latihan 2-3.2
Kompetensi 2,3,4 1.#include 2.#include 3. 4.int main() 5.{ 6. list coll; // list container for integer elements // append elements from 1 to for (int c=1; c<=20; ++c) { 10. coll.push_back(c); 11. } 12. system("PAUSE"); 13. return 0; 14.} Latihan 2-4.1
Kompetensi 2,3,4 1.#include 2.#include 3. 4.int main() 5.{ 6. list coll; // list container for integer elements // append elements from 1 to for (int c=1; c<=20; ++c) { 10. coll.push_back(c); 11. } 12. system("PAUSE"); 13. return 0; 14.} ……….. 20 Di Memori List Latihan 2-4.2
Kompetensi 2,3,4 1.#include 2.#include 3. 4.int main() 5.{ 6. list coll; // list container for integer elements // append elements from 1 to for (int c=1; c<=20; ++c) { 10. coll.____________(c); 11. } 12. system("PAUSE"); 13. return 0; 14.} … Di Memori List Latihan 2-4.3
Kompetensi 2,3,4 1.#include 2.#include 3. 4.int main() 5.{ 6. list coll; // list container for character elements // append elements from 1 to for (int c=1; c<=20; ++c) { 10. coll.push_front(c); 11. } while (! coll.empty()) { 14. cout << coll.front() << ' '; 15. coll.pop_front(); 16. } 17. cout << endl; system("PAUSE"); 20. return 0; 21.} … Di Layar Latihan 2-4.4
Kompetensi 2,3,4 #include int main() { list coll; // list container for character elements // append elements from 1 to 20 for (int c=1; c<=20; ++c) { coll.push_front(c); } while (! coll.empty()) { cout << coll.back() << ' '; coll.pop_back(); } cout << endl; system("PAUSE"); return 0; } … Dilayar ? Salah atau Benar Latihan 2-4.5
Tugas Membuat makalah yang mengupas isi header list.h. Makalah dibuat per 5 orang Dikumpulkan tgl 22 Maret 2012 melalui