Skip to content

Latest commit

 

History

History
59 lines (46 loc) · 1.59 KB

File metadata and controls

59 lines (46 loc) · 1.59 KB
description title ms.date api_location api_type topic_type f1_keywords helpviewer_keywords
Learn more about: not_eq
not_eq
08/09/2024
msvcrt.dll
msvcr80.dll
msvcr90.dll
msvcr100.dll
msvcr100_clr0400.dll
msvcr110.dll
msvcr110_clr0400.dll
msvcr120.dll
msvcr120_clr0400.dll
ucrtbase.dll
DLLExport
apiref
ISO646/not_eq
not_eq
std::not_eq
std.not_eq
not_eq function

not_eq

An alternative spelling for the != operator.

Syntax

#define not_eq !=

Remarks

C++:

  • not_eq can be used as alternative to !=. The /permissive- or /Za compiler option is required.
  • Including <iso646.h> or <ciso646> is deprecated. You can use the alternative spelling without including any header files.
  • There's no alternative spelling for ==.

C:

  • not_eq is an alternative spelling for !=. It is provided as a macro in <iso646.h>, which you must #include.
  • There's no alternative spelling for ==.

Example

// compile with: /EHsc
#include <iostream>
#include <iso646.h>

int main( )
{
   int x = 1, y = 2;
    
    // not_eq is available in C++ and C
    // This example is for C++, so no header file is needed to use not_eq
    // When compiling for C, #include <iso646.h> to use not_eq
    if (x not_eq y)
    {
        std::cout << "Not equal\n";
    }
}
Not equal

Requirements

Header: <iso646.h> is necessary if you are compiling for C.