c语言指针算法分析怎么写,什么叫指针算法啊??
該樓層疑似違規(guī)已被系統(tǒng)折疊?隱藏此樓查看此樓
Pointer arithmetic should not be used.
This rule refers to explicitly calculating pointer values. Any such pointer value then has the
potential to access unintended or invalid memory addresses. This is an area where there is a
danger of serious errors occurring in the code at run time. Pointers may go out of bounds of
arrays or structures, or may even point to effectively arbitrary locations. There is a particular
danger with complex memory models.
If pointer arithmetic is necessary, then appropriate reviews and/or dynamic checking code will be
required to ensure that the resulting pointer cannot point to unintended or invalid memory
addresses (see also Rule 4). Where such use is necessary the preferred method is to only
increment and decrement pointers using ++ or --, rather than performing other arithmetic
operations on the pointer.
總結(jié)
以上是生活随笔為你收集整理的c语言指针算法分析怎么写,什么叫指针算法啊??的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: MyEclipse导入项目后 js文件报
- 下一篇: C语言数理逻辑题目,数学逻辑推理题整理,