Some times ago, in universty we start study how to create dinamic structures like stack,list and etc.
and this is my queston:
Is STL fully use functonality of these structures, and is my header file well immitate some of the function for list in STL.
Is STL fully use functonality of these structures, and is my header file well immitate some of the function for list in STL.
Can you rephrase this?
As for sorting, the method you chose is not suitable to use with linked lists, as there is too much jumping between non-adjacent nodes.
This is the best method to sort linked lists (that I know of): http://en.wikipedia.org/wiki/Insertion_sort
In stl have a iterators.
In my header member-function at(index) returns ponter to the structure at this index. And in my program i can use list like a array.
some lke that
#include"list.h"
using namespace std;
void main()
{
list ls;
int num;
cout<<endl<<" Input numbers ";
while(cin>>num)
{
ls.push_front(num);