FIX: No Error and Constructor Not Called if Prototype Missing (152055)
The information in this article applies to:
- Microsoft Visual C++, 32-bit Learning Edition 4.0
- Microsoft Visual C++, 32-bit Learning Edition 4.2
- Microsoft Visual C++, 32-bit Enterprise Edition 4.2
- Microsoft Visual C++, 32-bit Professional Edition 4.0
- Microsoft Visual C++, 32-bit Professional Edition 4.1
- Microsoft Visual C++, 32-bit Professional Edition 4.2
This article was previously published under Q152055 SYMPTOMS
If a class declaration does not contain a default constructor declaration,
but there is a definition of a default constructor, no error message is
generated and the constructor is never called. The problem can be
reproduced by building the sample code below.
RESOLUTION
Make sure that each constructor implementation has its prototype in the
class declaration.
STATUS
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.
Modification Type: | Minor | Last Reviewed: | 7/5/2005 |
---|
Keywords: | kbbug kbCompiler kbCPPonly kbfix kbLangCPP kbVC500fix KB152055 |
---|
|