Can anyone please tell me how to create a pointer to a class that is using a template? My C++ book does not show an example of this and the compiler is having fits over it. I believe the syntax should be something like:
CLASSNAME<PARAMETER_TO_SUBSTITUTE>* POINTERNAME = new CLASSNAME(VARIABLES_FOR_CONSTRUCTOR);
my code specifically looks like:
C_linked_list_node<C_linked_list_data_mystring>* tail = NULL;
C_ordered_linked_list_head_node<C_linked_list_data_mystring>* headnode = new C_ordered_linked_list_head_node(testllmystring, tail);
and I get the following errors:
C:\Game Development\Game testing\stringtest\stringtest.cpp(384) : error C2955: 'C_ordered_linked_list_head_node' : use of class template requires template argument list
c:\game development\misc utilities\linked list.h(76) : see declaration of 'C_ordered_linked_list_head_node'
Any insight would be greatly appreciated! Thanks!
CLASSNAME<PARAMETER_TO_SUBSTITUTE>* POINTERNAME = new CLASSNAME(VARIABLES_FOR_CONSTRUCTOR);
my code specifically looks like:
C_linked_list_node<C_linked_list_data_mystring>* tail = NULL;
C_ordered_linked_list_head_node<C_linked_list_data_mystring>* headnode = new C_ordered_linked_list_head_node(testllmystring, tail);
and I get the following errors:
C:\Game Development\Game testing\stringtest\stringtest.cpp(384) : error C2955: 'C_ordered_linked_list_head_node' : use of class template requires template argument list
c:\game development\misc utilities\linked list.h(76) : see declaration of 'C_ordered_linked_list_head_node'
Any insight would be greatly appreciated! Thanks!