In orderedArrayListType missing template error occurs

Now why am I getting this error on EARTH:
1
2
3
4
5
6
C:\Dev-Cpp\Chapter9\orderedArrayListType.cpp: In member function `int orderedArrayListType<elemType>::minLocation(int, int)':
C:\Dev-Cpp\Chapter9\orderedArrayListType.cpp:359: error: missing template arguments before '[' token
C:\Dev-Cpp\Chapter9\orderedArrayListType.cpp:359: error: missing template arguments before '[' token

Execution terminated
 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include "arrayListType.h"
template <class elemType>
class orderedArrayListType : public arrayListType<elemType>
{
public:

void insertOrd(const elemType&);
int binarySearch(const elemType& item) const;
void selectionSort();

orderedArrayListType(int size = 100);
//int seqSearch(const elemType& item) const;
//Function to search the list for a given item.
//Postcondition: If the item is found, returns the location
// in the array where the item is found; otherwise,
// returns -1.

private:
void swap(int first, int second);
int minLocation(int first, int last);
};
template<class elemType>
 orderedArrayListType<elemType>::orderedArrayListType(int size )
//                       : arrayListType(size)
{     
      size = 100;          
}  //end constructor

template<class elemType>
int orderedArrayListType<elemType>::minLocation(int first, int last)
{
    int loc, minIndex;
    minIndex = first;
    
    for(loc = first + 1; loc <= last; loc++)
        if(list[loc] < list[minIndex])
           minIndex = loc;
    return minIndex;
} //end minLocation 
Sorted out eventually!!!!
Here are the results:
1
2
3
4
5
6
7
8
C:\Dev-Cpp\Chapter9>arrayListType
Line 3: Enter numbers ending with -999
45 67 89 12 3 -999
Line 8: The list before sorting:
45 67 89 12 3

Line 12: The list after sorting:
3 12 45 67 89
Topic archived. No new replies allowed.