Source: main.cc

#include <stdio.h>
#include <iostream.h>
#include "CList.h"

int main()
{
// Liste erstellen
CList<int *> * pList = new CList<int *>();

cout << "\nCreating list...\n\n";

int * pInt;
int iCount;

// Liste füllen
for (iCount = 1; iCount <= 5; iCount++)
{
pInt = new int;
*pInt = iCount * iCount;
pList->AddData (pInt);
}

cout << "\nList filled...\n\n";

pList->Dump();

cout << "\nRemoving from list...\n\n";

// Liste leeren
iCount=1;
while (pList->RemoveData(1,pInt))
{
cout << "Executing loop " << iCount++ << " - Result of GetData: " <<
*(pInt) << endl;
delete pInt;
}

cout << "\nNew list contents...\nPress almost any key to continue\n\n";

pList->Dump();



return 0;
}