You receive compiler errors when you compile a file that includes a C++ header file in a C program (104672)
The information in this article applies to:
- Microsoft Visual C++ for Windows, 16-bit edition 1.0
- Microsoft Visual C++ for Windows, 16-bit edition 1.5
- Microsoft Visual C++ for Windows, 16-bit edition 1.51
- Microsoft Visual C++ for Windows, 16-bit edition 1.52
- Microsoft Visual C++, 32-bit Editions 1.0
- Microsoft Visual C++, 32-bit Editions 2.0
- Microsoft Visual C++, 32-bit Editions 2.1
- Microsoft Visual C++, 32-bit Editions 4.0
- Microsoft Visual C++, 32-bit Editions 6.0
- Microsoft Visual C++, 32-bit Editions 5.0
This article was previously published under Q104672 SUMMARY
The following error is typically the first of many returned by the
Microsoft C/C++ Compiler when attempting to compile a file that includes a
C++ header file such as IOSTREAM.H in a C program:
ios.h(33) : error C2282: 'class' is followed by 'streambuf'.
(missing ','?)
In more recent versions of the compiler, the system header files use
#ifdef __cplusplus
to prevent the contents from being parsed when compiled as "C" code.
There may also be multiple C2065, C2297, C2054, C2085, C2143, and C2144 errors, and
eventually a C1003 error indicating that the error count reached 100.
Modification Type: | Minor | Last Reviewed: | 4/24/2006 |
---|
Keywords: | kbProgramming kbhowto kbCompiler kbCPPonly kbinfo KB104672 kbAudDeveloper kbAudITPRO |
---|
|