##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# C++ keywords: and

From cppreference.com
< cpp‎ | keyword

### [edit] Usage

- alternative operators: as an alternative for `&&`

### [edit] Example

Run this code

    #include <iostream>

    int n;
    int main()
    {
       if(n > 0 and n < 5)
       {
           std::cout << "n is small and positive\n";
       }
    }

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/keyword/and&oldid=80541"