//If anybody could help with the question I added in the "Making Second Node" section, I'd appreciate it. :)

#include <stdio.h>

#include <stdlib.h>

#include <string.h>

struct node {

int data ;

struct node * next ;

struct node * prev ;

} ;

main ( )

{

struct node * myList ;

struct node * data01 ;

struct node * data02 ;

int num1 = 7 ;

int num2 = 11 ; //Two pieces of data.

myList = NULL ; //Initializing the empty header node.

//Making first node.

data01 = malloc ( sizeof ( struct node ) ) ; //Allocating storage.

data01 -> data = num1 ; //Saving first piece of data.

myList = data01 ; //myList now points to first node.

//Assigning pointers to first node.

data01 -> next = NULL ; //This is now the end of the list.

data01 -> prev = myList ; //Points to beginning of list.

//Making second node.

data02 = malloc ( sizeof ( struct node ) ) ; //Allocating storage.

data02 -> data = num2 ; //Saving second piece of data.

data02 -> next = NULL ; //This is now the end of the list.

data01 -> next = data02 ; //First 'next'pointer now points to this new node.

//How else could I do this? Manually works, but it's not exactly elegant.

data02 -> prev = data01 ; //Points to last list entry.

print ( myList ) ;