You can do:
if (18 < age && age < 30) /*blah*/;
More Related Contents:
- Differences with const keyword in C++
- ‘clrscr()’ and ‘conio.h’ not working
- iterating over cases in c++ switch statement? [closed]
- How do I read an entire file into a std::string in C++?
- Rvalue Reference is Treated as an Lvalue?
- Why doesn’t a simple “Hello World”-style program compile with Turbo C++?
- How do I use the conditional (ternary) operator?
- C++ convert string to hexadecimal and vice versa
- Declaring the array size with a non-constant variable
- How to parse ini file with Boost
- How to create two classes in C++ which use each other as data?
- dereferencing the null pointer
- What exactly are C++ modules?
- How to generate the audio spectrum using fft in C++? [closed]
- Why don’t STL containers have virtual destructors?
- C++: When (and how) are C++ Global Static Constructors Called?
- Destructor being called twice when being explicitly invoked
- Is volatile bool for thread control considered wrong?
- CMake: failed to run MSBuild command: MSBuild.exe
- C++ Equivalent to Designated Initializers?
- Any Solution to Unpack a Vector to Function Arguments in C++?
- Why do you use std::move when you have && in C++11? [duplicate]
- Get an istream from a char*
- Visual Studio Code formatting for “{ }”
- Should a move constructor take a const or non-const rvalue reference?
- Is there a platform or situation where dereferencing (but not using) a null pointer to make a null reference will behave badly?
- How to add static libraries to a Visual studio project
- Visitor Pattern Explanation
- How to store array in one column in Sqlite3?
- Why can’t I static_cast between char * and unsigned char *?