You may receive an "error C2593: 'operator <<' is ambiguous" error message when you try to pass an __int64 variable to the ostream operator << (168440)
The information in this article applies to:
- The Standard C++ Library, when used with:
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
This article was previously published under Q168440 SYMPTOMS If you try to pass an __int64 variable to the ostream
operator <<, you get the following error: error
C2593: 'operator <<' is ambiguous CAUSE There is no operator << for __int64 type defined for
the ostream class. RESOLUTION Define your own version of operator <<. The following
sample code section shows a simple solution for << operator that converts
the __int64 variable to a char * type and passes it to the ostream <<
operator. STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.
This problem was corrected in Microsoft Visual C++
.NET.
Modification Type: | Major | Last Reviewed: | 5/26/2005 |
---|
Keywords: | kbBug kbCRT kberrmsg kbfix kbNoUpdate KB168440 kbAudDeveloper |
---|
|