1. This thread seems to have moved quite off-topic.

Seeing as you say there are many ways if making linked lists...could someone please just enter a simple program that will compile and show me how to use linked lists and output them.

2. Here's a link to the FAQ section of this site that provides all you ask for.

http://www.cprogramming.com/tutorial/lesson15.html

3. It seems easier to do it with classes....Kurisu's way looks like something that I understand...could someone just complete the code for me please.

4. The first example you were given by Kurisu is a pretty simple, but fully functional linked list. To create the list, the easiest way (IMHO) is to build it in 'reverse' order. By this, I mean, create the last/end node first.. then work your way to the front

Slightly modified version of Kurisu's first example:
Code:
```struct node
{
int value;
node* next;
node(node* n, int i) : next(n), value(i) {}
};

int main()
{
node* current = NULL;

for (int i=0; i!=10; ++i)
current = new node(current, i);
// Build a list in reverse
}```
Since the above code has built the list backwards, by the end of the for loop, current will be a pointer to the node object at the front of the list.

5. declare a public member function of the linkedList class to display the data stored within the linked list

within the body of the function definition do something like this:
Code:
```node * current;   //use a temporary node pointer to traverse the list
current = head;   //start at the front of the list
while(current != NULL)  //assuming there is a value associated with current
{
cout << current->value;  //display it
current = current->next; //now go to the next node in the the list
}```

6. ## Example

If your still looking for a simple example here is something that should compile.

1) Inserts 3 items into a linked list.
2) Displays all items to standard output.
3) Destroys linked list (frees allocated memory)

Code:
``` #include <iostream>

// THIS SECTION [1] WOULD NORMALLY GO INTO "linkedList.h"

struct node
{
int ID;
int phoneNum;
node *next;

// node *prev;  Used for a doubly linked list.  i.e. traverse both ways.
};

{
public:
void insertItem(int ID, int phoneNum);
void outputList();

private:

// Can add more stuff if desired i.e.	   int numEntries;  node *lastEntry;
};

// #endif
// END OF SECTION [1]

// THIS SECTION [2] WOULD NORMALLY GO INTO "linkedList.cpp"

{
}

{
node *iterator;

{

delete iterator;
}
}

{

{
}
else
{

while(iterator->next != NULL)
{
iterator = iterator->next;
}

iterator->next = new node;
iterator = iterator->next;
iterator->ID = ID;
iterator->phoneNum = phoneNum;
iterator->next = NULL;
}
}

{

while(iterator != NULL)
{
std::cout << "ID #: " << iterator->ID << "\nPhone Number: " << iterator->phoneNum << "\n\n";
iterator = iterator->next;
}
}

// END OF SECTION [2]

// THIS SECTION [3] WOULD NORMALLY GO INTO "main.cpp"

int main()
{

students.insertItem(1, 2983223);
students.insertItem(2, 1456784);
students.insertItem(3, 4868336);

students.outputList();

return 0;
}
// END OF SECTION [3]```
Of course you can modify this for inserting items anywhere in the list; searching list; etc.

Graphical Representation of above Linked List