Help!

I can not figure out this linked list using a date. I got it to work using a number, but the teacher wants us to modify the program and make it work with a date. Can you look at my code and tell me where to I make this change at? Everything I try comes out with . Any helpful code or advise is appreciated!

Thanks Bro.

Same output should be like:
What value do you wish to append?
Enter the month: 10
Enter the day: 21
Enter the year: 2001
Here is the list
10/21/2001

This is my working code for a number

#include <stdlib.h>
#include <iostream.h>
template <class T>
{
private:
struct ListNode
{

T value;
//char date[20];
//int day, month, year, value;
struct ListNode *next;
};
public:
void appendNode(T);
void insertNode(T);
void deleteNode(T);
void displayList(void);
};
//**************************************************
// appendNode appends a node containing the *
// value pased into num, to the end of the list. *
//**************************************************
template <class T>
{
ListNode *newNode, *nodePtr;
// Allocate a new node & store num
newNode = new ListNode;
newNode->value = num;
newNode->next = NULL;
// If there are no nodes in the list
// make newNode the first node
else // Otherwise, insert newNode at end
{
// Initialize nodePtr to head of list
// Find the last node in the list
while (nodePtr->next)
nodePtr = nodePtr->next;
// Insert newNode as the last node
nodePtr->next = newNode;
}
}
//**************************************************
// displayList shows the value *
// stored in each node of the linked list *
// pointed to by head. *
//**************************************************
template <class T>
{
ListNode *nodePtr;
while (nodePtr)
{
cout << nodePtr->value << endl;
nodePtr = nodePtr->next;
}
}
//**************************************************
// The insertNode function inserts a node with *
// num copied to its value member. *
//**************************************************
template <class T>
{
ListNode *newNode, *nodePtr, *previousNode;
// Allocate a new node & store num
newNode = new ListNode;
newNode->value = num;

// If there are no nodes in the list
// make newNode the first node
{
newNode->next = NULL;
}
else // Otherwise, insert newNode
{
// Initialize nodePtr to head of list
// Skip all nodes whose value member is less
// than num.
while (nodePtr != NULL && nodePtr->value < num)
{
previousNode = nodePtr;
nodePtr = nodePtr->next;
}
// If the new node is to be the 1st in the list,
// insert it before all other nodes.
if (previousNode == NULL)
{
newNode->next = nodePtr;
}
else // Otherwise, insert it after the prev. node.
{
previousNode->next = newNode;
newNode->next = nodePtr;
}
}
}
//**************************************************
// The deleteNode function searches for a node *
// with num as its value. The node, if found, is *
// deleted from the list and from memory. *
//**************************************************
template <class T>
{
ListNode *nodePtr, *previousNode;
// If the list is empty, do nothing.
return;

// Determine if the first node is the one.
{
}
else
{
// Initialize nodePtr to head of list
// Skip all nodes whose value member is
// not equal to num.
while (nodePtr != NULL && nodePtr->value != num)
{
previousNode = nodePtr;
nodePtr = nodePtr->next;
}
// Link the previous node to the node after
// nodePtr, then delete nodePtr.
previousNode->next = nodePtr->next;
delete nodePtr;
}
}
//**************************************************
// Destructor *
// This function deletes every node in the list. *
//**************************************************

template <class T>
{
ListNode *nodePtr, *nextNode;
while (nodePtr != NULL)
{
nextNode = nodePtr->next;
delete nodePtr;
nodePtr = nextNode;
}
}

void main(void)
{
// Date value;//You can change this to work with integers or dates
int Response = -1;
int Value;
cout<<"What do you want to do"<<endl;
while(Response != 1)
{
cout<<"(1) Exit"<<endl;
cout<<"(2) Append a node"<<endl;
cout<<"(3) Insert a node"<<endl;
cout<<"(4) Delete a node"<<endl;
cout<<"(5) Delete the list"<<endl;
cout<<"(6) Display the list"<<endl;
cin>>Response;
switch(Response)
{
case 1:
cout<<"Thanks for visiting. Bye."<<endl;
break;
case 2:
cout<<"What value do you wish to append?"<<endl;
cin>>Value;
List.appendNode(Value);
cout<<"Here is the list"<<endl;
List.displayList();
break;
case 3:
cout<<"What value do you wish to insert?"<<endl;
cin>>Value;
List.insertNode(Value);
cout<<"Here is the list"<<endl;
List.displayList();
break;
case 4:
cout<<"What value do you wish to delete?"<<endl;
cin>>Value;
List.deleteNode(Value);
cout<<"Here is the list"<<endl;
List.displayList();
break;
case 5:
cout<<"Are you sure you want to delete the list(Y for yes)?"<<endl;
{
// List.deleteNode(Value);
}
else
{
cout<<"Here is the list"<<endl;
List.displayList();
// system("PAUSE");
}
break;

case 6:
cout<<"Here is the list"<<endl;
List.displayList();
break;
default:
cout<<"Please enter a value 1 - 6"<<endl;
}
}
system("PAUSE");
}

2. A) Use code tags.

B) Instead of using a template, just drop it and make 3 ints for month, day, and year.

3. This is the easiest way, assuming that your compiler isn't an old cheap one that schools seem to love and never conforms to the current standard. But before I post the code, two things:

1) Don't use void main, it's wrong.
2) You really don't want to explicitly call the destructor of your class. Bad things can happen. I didn't write a destroyList method for you, that's your job. Just remember to remove the destructor call.
3) Please for the love of god use the code tags when your source is more than 10 lines. I could have fixed this in less than a minute, but it took me considerably longer because I had to reformat everything.
4) I didn't change the interface at all, just the processing. Once again that is your job.

Okay, four things, but you know what they say about mathematicians. There are three kinds, those who can count and those who can't. Good thing I'm a programmer.
Code:
```#include <iostream>
#include <cstdlib>
#include <string>
using namespace std;

template <class T>
{
private:
struct ListNode
{
string value;
struct ListNode *next;
};
public:
void appendNode(T);
void insertNode(T);
void deleteNode(T);
void displayList(void);
};

template <class T>
{
ListNode *newNode, *nodePtr;
newNode = new ListNode;
newNode->value = num;
newNode->next = NULL;
else
{
while (nodePtr->next)
nodePtr = nodePtr->next;
nodePtr->next = newNode;
}
}

template <class T>
{
ListNode *nodePtr;
while (nodePtr)
{
cout << nodePtr->value << endl;
nodePtr = nodePtr->next;
}
}

template <class T>
{
ListNode *newNode, *nodePtr, *previousNode;
newNode = new ListNode;
newNode->value = num;
newNode->next = NULL;
}
else{
while (nodePtr != NULL && nodePtr->value < num) {
previousNode = nodePtr;
nodePtr = nodePtr->next;
}
if (previousNode == NULL) {
newNode->next = nodePtr;
}
else {
previousNode->next = newNode;
newNode->next = nodePtr;
}
}
}

template <class T>
{
ListNode *nodePtr, *previousNode;
return;
}
else {
while (nodePtr != NULL && nodePtr->value != num) {
previousNode = nodePtr;
nodePtr = nodePtr->next;
}
previousNode->next = nodePtr->next;
delete nodePtr;
}
}

template <class T>
{
ListNode *nodePtr, *nextNode;
while (nodePtr != NULL) {
nextNode = nodePtr->next;
delete nodePtr;
nodePtr = nextNode;
}
}

int main(void)
{
int Response = -1;
string Value;
cout<<"What do you want to do"<<endl;
while(Response != 1) {
cout<<"(1) Exit"<<endl;
cout<<"(2) Append a node"<<endl;
cout<<"(3) Insert a node"<<endl;
cout<<"(4) Delete a node"<<endl;
cout<<"(5) Delete the list"<<endl;
cout<<"(6) Display the list"<<endl;
cin>>Response;
switch(Response)
{
case 1:
cout<<"Thanks for visiting. Bye."<<endl;
break;
case 2:
cout<<"What value do you wish to append?"<<endl;
cin>>Value;
List.appendNode(Value);
cout<<"Here is the list"<<endl;
List.displayList();
break;
case 3:
cout<<"What value do you wish to insert?"<<endl;
cin>>Value;
List.insertNode(Value);
cout<<"Here is the list"<<endl;
List.displayList();
break;
case 4:
cout<<"What value do you wish to delete?"<<endl;
cin>>Value;
List.deleteNode(Value);
cout<<"Here is the list"<<endl;
List.displayList();
break;
case 5:
cout<<"Are you sure you want to delete the list(Y for yes)?"<<endl;
}
else {
cout<<"Here is the list"<<endl;
List.displayList();
}
break;
case 6:
cout<<"Here is the list"<<endl;
List.displayList();
break;
default:
cout<<"Please enter a value 1 - 6"<<endl;
}
}
cin.get();
return 0;
}```
-Prelude