Skip to content

Search topics & cppreference

Search all study topics, concept maps, and 6,587 C++ and C reference pages.

C++ keyword: not_eq

NotebookLM

Usage

Example

example.cpp
#include <iostream>
 
void show(bool z, const char* s, int n)
{
    const char* r { z ? " true  " : " false " };
    if (n == 0) std::cout << "┌────────────────────┬─────────┐\n";
    if (n <= 2) std::cout << "│ "      <<s<<     " │ "<<r<<" │\n";
    if (n == 2) std::cout << "└────────────────────┴─────────┘\n";
}
 
int main()
{
    show(false not_eq false, "false not_eq false", 0);
    show(false not_eq true , "false not_eq true ", 1);
    show(true  not_eq false, "true  not_eq false", 1);
    show(true  not_eq true , "true  not_eq true ", 2);
}
Output
┌────────────────────┬─────────┐
│ false not_eq false │  false  │
│ false not_eq true  │  true   │
│ true  not_eq false │  true   │
│ true  not_eq true  │  false  │
└────────────────────┴─────────┘

See also

Content from this page on cppreference.com, licensed under CC-BY-SA 3.0 and GFDL. Modified: restyled, site navigation removed, code windows added. Offline snapshot of 9 February 2025.