Article ID: 148504 - View products that this article applies to.
This article was previously published under Q148504
When encountering a cast to a structure pointer in the default argument of a class member function, the Visual C++ compiler generates the following error:
This error does not occur if the function declaration is not a member of a class.
error C2371: 'MyClass' : redefinition; different basic types
If you are casting from an integral literal, remove the cast. For example, change this:
If you are casting from a different structure type, remove the struct keyword from the cast. For example, change this:
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug was corrected in Visual C++ version 5.0.
Article ID: 148504 - Last Review: July 5, 2005 - Revision: 1.1