New to templates and lists but i have to use them for a class project. I got it working in one file then i tried to make it a class and I keep getting this error:
1>c:\users\r4ck13y\programming\c++ projects\project2.1\project2.1\merginglists.h(11) : error C2955: 'std::list' : use of class template requires template argument list
1> c:\program files\microsoft visual studio 9.0\vc\include\list(95) : see declaration of 'std::list'
Here is the header file that im about 90% sure the error is coming from. Please help. Thank you.
#ifndef MERGINGLISTS
#define MERGINGLISTS
#include "stdafx.h"
#include <list>
#include <iostream>
using namespace std;
class MergingLists : public list
{
public:
MergingLists();
template <typename T> void splitlist(list<T> L, list<T>& first, list<T>& second);
template <typename T> list<T> merge(list<T>& first, list<T>& second);
template <typename T> list<T> mergesort(list<T>& L);
};
#endif