I have the following class
Code:
// ZLine.h
#ifndef _ZLINE_H
#define _ZLINE_H
namespace Z_GLC {
template<typename T> class ZLine
{
public:
ZLine(T x1, T y1, T x2, T y2);
double DistanceFromPoint(T x, T y);
private:
T a, b, c;
};
} // namespace
#endif
Code:
// ZLine.cpp
#include "ZLine.h"'
namespace Z_GLC {
template<typename T> ZLine<T>::ZLine(T x1, T y1, T x2, T y2)
{
// implementation
}
template<typename T> double ZLine<T>::DistanceFromPoint(T x, T y)
{
// implementation
}
} // namespace
When I try to use the class I get link errors. How to deal with this issue?