The information in this article applies to:
SYMPTOMSWhen Microsoft C/C++ compiles an application, it generates the following message for each class constructor:
CAUSEThe source code has an embedded aggregate member (class, struct, or union) in a class definition and the compiler command line includes the /W4 and /f- compiler options. Note that the /f- option is not supported in the Microsoft Visual C++ 32-bit compiler. RESOLUTIONThe C4705 warning is incorrect and can be safely ignored. If the embedded aggregate is a class, define a default constructor. This will supress the warning. STATUSMicrosoft has confirmed this to be a bug in the products listed at the beginning of this article. This problem was fixed in Microsoft Visual C++, version 4.0. MORE INFORMATIONThe C4705 warning usually indicates a statement does not affect program execution. Each of the following statements causes this particular warning:
The code example below demonstrates a structure data member that
generates the C4705 warning for each class constructor. The warning
also occurs if the example used a class or a union instead of a
structure.
Sample Code
Additional query words: 7.00 8.00 8.00c 9.00 9.10 1.00 1.50 1.51 2.00 2.10 2.20
Keywords : kbCompiler kbCPPonly kbVC |
Last Reviewed: February 2, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |