List of C ++ symbol priorities

Source: Internet
Author: User

Descending order of priority

Operator Function Usage
:: Full Local Area : Name
:: Category Classtype: name
:: Namespace domain Namespace: name
. Member Selection Object. member
-> Member Selection Pointer-> member
[] Subscript Variable [expr]
() Function call Name (expr_list)
() Type Construction Type (expr_list)
++ Post Increment Lvalue ++
-- Post-Decrease Lvalue --
Typeid Type ID Typeid (type)
Typeid Runtime type ID Typeid (expr)
Const_cast Type conversion Const_cast <type> (expr)
Dynamic_cast Type conversion Dynamic_cast <type> (expr)
Reinterpret_cast Type conversion Reinterpret_cast <type> (expr)
Static_cast Type conversion Static_cast <type> (expr)
Sizeof Object size Sizeof object
Sizeof Type size
Sizeof (type)
++ Increment ++ Lvalue
-- Descending front -- Lvalue
~ Non-bitwise ~ Expr
! Non-logical ! Expr
- RMB reduction -Expr
+ Mona1 Addition + Expr
* Unreference * Expr
& Fetch address & Expr
() Type conversion (Type) expr
New Allocation object New type
New Allocate/initialize objects New type (expr_list)
New Allocate/replace objects New (expr_list) type (expr_list)
New Allocate an array All Forms
Delete Release object All Forms
Delete Release an array All Forms
-> * Point to member selection Pointer-> * pointer_to_member
.* Point to member selection Object. * pointer_to_member
* Multiplication Expr * expr
/ / Expr/expr
% Modulo (remainder) Expr % expr
+ Add Expr + expr
- Subtraction Expr-expr
< Shift left by bit Expr <expr
> Shift right by bit Expr> expr
< Less Expr <expr
<= Less than or equal Expr <= expr
> Greater Expr> expr
> = Greater than or equal Expr> = expr
= Equal Expr = expr
! = Not equal Expr! = Expr
& Bitwise AND Expr & expr
^ Bitwise OR Expr ^ expr
| By bit or Expr | expr
&& Logic and Expr & expr
| Logic or Expr | expr
? : Conditional expressions Expr? Expr: expr
= Assignment Lvalue = expr

=, * =,/=, % =, + =,-=, <=, >>=, & =, | =, ^ =

Compound assignment Lvalue + = expr and so on
Throw Throw an exception Throw expr
, Comma Expr, expr

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.