Hi,

I wanted to know how can I free the memory when the program exits. I wrote a linked list program using the following structure:

struct node
{
node *prev;
char c;
node *next;
};

When i exit the program and then again run it, the values which are displayed are the values which were entered in the previous run.

I'm using Borland C++.

Cheers,
Utsav