翻訳と辞書
Words near each other
・ department of defense network
・ depeditate
・ dependability
・ dependable software
・ deployment descriptor
・ deprecated
・ depth-first search
・ deque
・ dequeue
・ der
dereference
・ derived class
・ derived type
・ des
・ descender
・ descent function
・ descriptive intermediate attributed notation for ada
・ descriptive top-level specification
・ descriptor
・ design


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

dereference : FOLDOC
dereference
To access the thing to which a pointer points, i.e. to follow the pointer. E.g. in C, the declarations
int i;
int *p = &i;

declare i as an integer and p as a pointer to integer. p is initialised to point at i ("&i" is the address of i - the inverse of "*"). The expression *p dereferences p to yield i as an lvalue, i.e. something which can appear either on the left of an assignment or anywhere an integer expression is valid. Thus
*p = 17;

would set i to 17. *p++ is not the same as i++ however since it is parsed as *(p++), i.e. increment p (which would be an invalid thing to do if it was pointing to a single int, as in this example) then dereference p's old value.
The C operator "->" also dereferences its left hand argument which is assumed to point to a {structure} or union of which the right hand argument is a {member}.
At first sight the word "dereference" might be thought to mean "to cause to stop referring" but its mean


スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.