Original Post
In an attempt to use class templates I''ve created a simple class, which of course doesn''t work.
::GetArea(void)" (?GetArea@?$Box@H@@QAEHXZ)" THe .h and .cpp files in which this is located are properly linked (other things in them work). Any idea what''s wrong?
template <class Type>
class Box
{
Type Width;
Type Length;
public:
Box ()
{
Width = 25;
Length = 30;
};
Type GetArea ();
};
template <class Type>
Type Box<Type>::GetArea ()
{
return Width*Height;
};
Box<int> Square;
When i try using Square.GetArea() in the code i get the following error: "unresolved external symbol "public: int __thiscall Box