I have a Rectangle class that I've created but when I try to use it I get compile errors:
error C2923: 'Ref' : 'Rectangle' is not a valid template type argument for parameter 'T'.
error C3203: 'Ref' : unspecialized class template can't be used as a template argument for template parameter 'T', expected a real type
error C2371: 'RectRef' : redefinition; different basic types; see declaration of 'RectRef'
When I do a check it seems to me that there is a function BOOL Rectangel(HDC hdc, int left, int top, int right, int bottom) that is causing the problem because the compiler is treating my class as a Redefinition of the type Rectangle. How do I get around this obstacle? I'm using MS Visual C++ 2008 IDE.
In the code snippet template class Ref is basically a smart pointer (similar to std::auto_ptr).
typdef Ref<Rectangle> RectRef;