The information in this article applies to:
SUMMARY
In C++, the result of a cast to a reference type is an lvalue; casts
to any other type are not lvalues. This is explicitly stated in the
"C++ Annotated Reference Manual," by Ellis and Stroustrup, on page 69.
In a .C file, explicit casting to any data type may result in an lvalue only if Microsoft language extensions are enabled. The same error is
generated in a .C file if Microsoft extensions are disabled.
Microsoft C/C++ does provide a mechanism for achieving this by implementing a cast to a reference that achieves the same effect:
Sample Code
Additional query words:
Keywords : kbcode kbLangC kbLangCPP kbVC100 kbVC150 kbVC200 kbVC210 kbVC400 kbVC500 |
Last Reviewed: September 29, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |