This is my first program i tried to write in c++ template....I tried to convert a normal class into a template class by all the rules i knew already.I am already getting compilation error ,please provide guidance.
IDE : VS 2012
OS : Windows 7
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#pragma once
template <class T>
class Point {
public :
Point();
Point(T ,T);
Point(const T&);
~Point();
Point& operator=(const Point&);
T x() const;
T y() const;
string toString() const;
protected:
T _x,_y;
};
The error : missing ; before string ? line 15 here