template <class Type>
class Punct {
protected:
Type _x; // (1)
Type _y; // (1)
public:
Punct(Type = 0, Type = 0); // (2)
~Punct();
inline Type getX() const { return _x; }
inline Type getY() const { return _y; }
inline void setX(Type x) { _x = x; }
inline void setY(Type y) { _y = y; }
inline void moveBy(int x, int y) { _x = x; _y = y; }
friend std::istream &operator>>(std::istream&ins, Punct<Type>& A);
friend std::ostream &operator<<(std::ostream&outs, const Punct<Type>& A);
};
These are the errors I get:
(1) - FIeld has incomplete type 'Type'
(2) - No viable conversion from int to type (and some add 3. Passing argument to parameter here)
Could you please tell me what is it that I'm doing wrong?