收集整理的 C 常用表(方便查詢)

2021-07-02 07:32:21 字數 3105 閱讀 5603

本列表中運算子優先順序從上往下,優先順序依次降低。優先順序最高的為::(作用域解析運算子)。

precedence

operator

description

associativity

1::

scope resolution

left-to-right

2++--

suffix/postfix increment and decrement

type()type{}

function-style type cast

()

function call

array subscripting

.

element selection by reference

->

element selection through pointer

3++--

prefix increment and decrement

right-to-left

+-

unary plus and minus

!~

logical not and bitwise not

(type)

c-style type cast

*

indirection (dereference)

&

address-of

sizeof

size-of[note 1]

new,new

dynamic memory allocation

delete,delete

dynamic memory deallocation

4.*->*

pointer to member

left-to-right

5*/%

multiplication, division, and remainder

6+-

addition and subtraction

7<<>>

bitwise left shift and right shift

8<<=

for relational operators < and ≤ respectively

>>=

for relational operators > and ≥ respectively

9==!=

for relational = and ≠ respectively

10&

bitwise and

11^

bitwise xor (exclusive or)

12|

bitwise or (inclusive or)

13&&

logical and

14||

logical or

15?:

ternary conditional[note 2]

right-to-left

=

direct assignment (provided by default for c++ classes)

+=-=

assignment by sum and difference

*=/=%=

assignment by product, quotient, and remainder

<<=>>=

assignment by bitwise left shift and right shift

&=^=|=

assignment by bitwise and, xor, and or

16throw

throw operator (for exceptions)

17,

comma

left-to-right

下面這張運算子優先順序表是擷取自c++ primer plus(6th edition),如下圖所示:

Git常用操作命令收集 整理

git常用操作命令收集 檢出倉庫 gitclonegit git 檢視遠端倉庫 gitremote v 新增遠端倉庫 gitremote add name url 刪除遠端倉庫 gitremote rm name 修改遠端倉庫 gitremote set url push name newurl 拉...

各種常用的css樣式(收集整理)

a a標籤去掉下劃線 a 滑鼠手型樣式 li 列表樣式 無。li標籤去掉點 em 去掉em標籤斜體樣式,初始化 用a標籤實現跳轉到本頁面或者目標頁面的頂部 底部或者某一位置 1 定義目標位置,賦予id。2 給a標籤新增href為 id。文字兩端對齊 text align justify 偽元素選擇器...

WinCE 5 0常用函式收集整理

1 在wince下能夠直接訪問的都是虛擬位址,不能直接訪問gpio埠,因此我們首先需要將gpio口的物理位址對映到虛擬位址上來。在普通的應用程式或者驅動中訪問記憶體,還要再用virtuaalloc virtualcopy做乙個核心到當前程序的二次對映 有一種情況例外,就是你的os被配置成full k...