The goal of the program is to use templates to create generic lists. My DoublyLinkedList.cpp file takes in a generic type and later stores elements in a linked-list fashion. Anyways, I'm having trouble getting my main function to initialize the list. Some of my code can be found below.
int main(int argv, char* argv[])
{
cout << "Enter list type (i = int, f = float, s = std:string)";
char listType;
cin >> listType;
if (listType == 'i')
{
DoublyLinkedList<int>* list = new DoublyLinkedList<int>();
}
else if (listType == 'f')
{
DoublyLinkedList<float>* list = new DoublyLinkedList<float>();
}
else
{
DoublyLinkedList<string>* list = new DoublyLinkedList<string>();
}
(*list).print();
}