All Operators
All Operators
A compact scan page listing the main C and C++ operators, punctuators, and alternative operator tokens.
All Operators
A compact scan page listing the main C and C++ operators, punctuators, and alternative operator tokens.
Use reference pages to confirm names, categories, nearby facilities, and the constraints that matter before writing or reviewing code.
This page is optimized for fast scanning. Use Operators and punctuators when you want the grouped explanations and caveats.
+, -, *, /, %+, unary -++, --==, !=, <, <=, >, >=<=>!, &&, ||not, and, or~, &, |, ^, <<, >>&=, |=, ^=, <<=, >>=bitand, bitor, xor, compl, and_eq, or_eq, xor_eq=+=, -=, *=, /=, %=?:., ->, [], ()::, .*, ->*&, unary *(type)static_cast, dynamic_cast, const_cast, reinterpret_castsizeof, alignof, decltype, typeid, noexcept,, ;, :{ }, ( ), [ ], < >...#include <iostream>
struct Point {
int x{};
int y{};
};
int main() {
Point p{3, 4};
int total = (p.x + p.y) * 2;
bool large = total >= 10 && p.x != 0;
std::cout << (large ? total : 0) << '\n';
}