节点文献
C/C++中指针编程的破解
A guide to pointer programming in C/C++
【摘要】 针对C/C++指针编程难的问题,提出“三步法”的解决方法。“三步法”将指针编程的整个过程归纳为固定步骤和具体任务,破解指针的抽象。在完成“三步法”的具体任务时,针对指向基本变量、一维数组、二维数组的指针,分别给出指针的定义、初始值、表示任一元素的地址和值的固定格式,并从外形符号找出相对应的“等价”,破解指针的灵活性。最后举例说明“三步法”的使用“。三步法”在教学中取得了很好的效果。
【Abstract】 The "Three-Step Method" is put forth for pointer programming in C/C++. It breaks the pointer programming down into definite steps and specific tasks to remove the abstraction of pointers. While completing the specific tasks, the pointer definition,pointer initial values, and elements’ address and value in fixed formats are given for pointers to basic variables, one-dimensional arrays, and two-dimensional arrays, respectively. The "equivalence" relations are found according to their notations, and the flexibility of the pointer is deciphered. Finally, an example is given to demonstrate the good effect of the "three-step method" in teaching.
- 【文献出处】 计算机时代 ,Computer Era , 编辑部邮箱 ,2022年11期
- 【分类号】TP312.1-4
- 【下载频次】155