cpp2html 0.1-alpha © 2002 Andrea Leofreddi. To get the source click here

// esercizio 1: Linked List
#include <iostream>
#include "es1.h"

void main() {
	LinkedList lista_int;

	lista_int.push(4);
	lista_int.push(3);
	lista_int.push(2);
	lista_int.push(1);
	lista_int.push(9);
	
	cout << "Dump della lista\n";
	LinkedList::ListNode *head = lista_int.get_head();
	for(int i = 0; head; head = head->next, ++i) {
		cout << "Elemento " << i << ": " << head->data.get_data() << endl;
	}
}