Article ID: 158206 - Last Review: January 11, 2006 - Revision: 4.0 How to use the string::operator!= STL function in Visual C++This article was previously published under Q158206 Note Microsoft Visual C++ .NET 2002 and Microsoft Visual C++ .NET 2003 support both the managed code model that is provided by the Microsoft .NET Framework and the unmanaged native Microsoft Windows code model. The information in this article applies only to unmanaged Visual C++ code. Microsoft Visual C++ 2005 supports both the
managed code model that is provided by the Microsoft .NET Framework and the unmanaged
native Microsoft Windows code model. On This PageSUMMARY The sample code below illustrates how to use the
string::operator!= STL function in Visual C++. MORE INFORMATIONRequired HeaderPrototypeDescriptionThere are two versions of the string::operator!= function. Both versions are used to compare a null-terminated character array against a basic_string. They perform this operation by negating the result of (LString==RCharArray) or (LCharArray==RString). For more information on this comparison, please see the string::operator== function.Notice that this operator does not work with NULL pointer for the character array. You will need to make sure that the character array is not NULL before you pass it to the operator. Sample CodeREFERENCES Visual C++ Books On Line: Visual C++ Books:C/C++:Standard
C++ Library Reference. APPLIES TO
| Article Translations
|
Back to the top
