問題描述
誰能用一個合適的例子向我解釋這些指針......以及何時使用這些指針?
Can anyone explain to me these pointers with a suitable example ... and when these pointers are used?
推薦答案
在過去,根據(jù) Turbo C 手冊,當(dāng)整個代碼和數(shù)據(jù)適合一個段時,近指針只有 16 位.遠指針由段和偏移量組成,但未執(zhí)行規(guī)范化.一個巨大的指針被自動規(guī)范化.可以想象,兩個遠指針可以指向內(nèi)存中的同一位置但不同,而指向同一內(nèi)存位置的規(guī)范化大指針將始終相等.
In the old days, according to the Turbo C manual, a near pointer was merely 16 bits when your entire code and data fit in the one segment. A far pointer was composed of a segment as well as an offset but no normalisation was performed. And a huge pointer was automatically normalised. Two far pointers could conceivably point to the same location in memory but be different whereas the normalised huge pointers pointing to the same memory location would always be equal.
這篇關(guān)于什么是近指針、遠指針和巨指針?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!