I'm just starting an assignment for school and I'm getting the following error:
I don't know why this is happening. I've included the class header and I'm not using any fancy methods from other classes, just trying to make an object of the class to test the basics of the code. All of these files are in the same project on code blocks, the file sturcture is here.
This is my code, can anyone point out what I'm doing wrong, I'm just trying to start the assignment.
Main Method
#include <iostream>
#include "sorting.h"
using namespace std;
int main()
{
sorting<int> object;
}
Header
#ifndef SORTING_H
#define SORTING_H
template <class T>
class sorting
{
public:
sorting();
~sorting();
private:
};
#include "..\src\sorting.cpp"
#endif // SORTING_H
Implementation
#include "sorting.h"
#ifdef _SORTING_H_
template<class T>
sorting<T>::sorting()
{
//ctor
}
template<class T>
sorting<T>::~sorting()
{
//dtor
}
#endif