[C++] Operator overloading ⑦ (Unary operator overloading | Postfix operator overloading | Use global functions to implement postfix ++ auto-increment operator overloading | Use member functions to implement postfix — auto-decrement operator overloading)

Article directory 1. Post operator overloading 1. Use global functions to implement postfix + + auto-increment operator overloading 2. Use member functions to implement postfix — decrement operator overloading 2. Complete code example In the previous blog [C++] operator overloading ⑥ (unary operator overloading | post-operator overloading | the difference between pre-operator overloading and post-operator […]

[C++] Operator overloading ④ (Unary operator overloading | Use global function to implement prefix ++ auto-increment operator overloading | Use global function to implement prefix – – Auto-decrement operator overloading)

Article directory 1. Unary operator overloading 1. List of unary operators 2. Implement operator overloading operations for the following classes 3. Use global functions to implement prefix + + auto-increment operator overloading 4. Use global functions to implement prefix – – overloading of the decrement operator 2. Complete code example 1. Unary operator overloading 1. […]

[C++] Operator overloading ⑤ (Unary operator overloading | use member functions to implement prefix ++ auto-increment operator overloading | use member functions to implement prefix – – auto-decrement operator overloading)

Article directory 1. Unary operator overloading 1. Use member functions to implement prefix + + auto-increment operator overloading 2. Use member functions to implement prefix – – overloading of the decrement operator 2. Complete code example 1. Unary operator overloading 1. Use member functions to implement prefix + + auto-increment operator overloading Use global functions […]

Get through the whole article: Interpretation of pre-post auto-increment and auto-decrement from the perspective of bytecode instructions (add plus ++ minus minus –)

Article directory 1. Pre-understanding knowledge 1.1 The stack data structure 1.2 Local variable table and operand stack 1.3 Three bytecode instructions 2. Separately use rear + + and front + + 2.1 Postfix ++ bytecode instructions 2.2 Prefix ++ bytecode instruction 2.3 Summary 3. Use post ++ and pre ++ when a return value is […]

JS-4 operators and operands; arithmetic operators; assignment operators; in-place modification; self-increment, self-decrement; operator precedence; comparison operators;

Table of Contents 1_Operators and operands 1.1_operators 1.2_Operators 2_ arithmetic operators 3_ assignment operator 4_Modify in place 5_Increment and decrement 5.1_Increment and decrement operators 5.2_ Position of auto-increment and auto-decrement 6_ operator precedence 7_ comparison operators 7.1_ The result of the comparison operator is Boolean type 7.2 Difference between _=== and == 1_operators and operands […]