Hello all,
I am new to C++ and I wish to do a linked list. Does C++ not have a built in library function for linked lists which means I don't have to create a list class ??
I have tried the following code, which just gives the error List undeclared.
#include <iostream.h>
#include <stdlib.h>
int main()
{
List<int> list;
int ix;
for (ix = 0; ix < 10; ix++) list.append(ix);
ListIterator<int> iter(list);
while (!iter.terminate()) {
printf("%d ", iter.current());
iter.succ();
}
puts("");
system("PAUSE");
return 0;
}
Can someone point me in the right direction to achieve a linked list, I wish to do it with Objects (I assume this is OK?).
Thanks in advance
L