/*
	Twilight Prophecy 3D/Multimedia SDK
	A multi-platform development system for virtual reality and multimedia.

	Copyright (C) 1997-2001 by Twilight 3D Finland Oy Ltd.

	This program is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2 of the License, or
	(at your option) any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program; if not, write to the Free Software
	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

	Please read the file LICENSE.TXT for additional details.


	source:
		LinkedList example

	Revision history:
		Jun/10/1999 - Jukka Liimatta - initial revision
*/
#include <prcore/prcore.hpp>
#include <iostream>

using namespace prcore;
using namespace std;



int main()
{
	// create list
	LinkedList<int> list;

	// add integers to the list
	list.PushBack( 6 );
	list.PushBack( 4 );
	list.PushBack( 2 );

	// iteration example
	LinkedList<int>::Iterator* node = list.Begin();
	while ( node )
	{
		cout << **node << endl;
		node = node->next;
	}

	// demonstrate indexing
	cout << "index test" << endl;
	cout << list[2] << endl;

	return 0;
}
