Hi, guys,
Here is a simple template class definition:
template <typename T = int>
class Point {
public:
T X;
T Y;
T Z;
};
int main()
{
Point<point1;
Point<doublepoint2;
}
There is already a default type "int" for class Point. But I still
need to type "<>" when creating a object.
I don't want to put "<>" in the code, because I think it's useless.
Point<point1;
How can I write the code like this
Point point1;
I tried "typedef", but it doesn't work.
typedef Point<Point;
Thanks,
Ed.