这个问题在这里已经有了答案:
13 年前关闭。
见:Understanding Pointers
在许多 C 风格的语言中,以及像 Fortran 这样的一些较老的语言中,可以使用 指针 .
作为一个只用基本的、javascript 和 ActionScript 真正编程的人,你能向我解释一下指针是什么,它最有用的地方是什么?
谢谢!
最佳答案
本维基百科 article将为您提供有关指针的详细信息:
In computer science, a pointer is a programming language data type whose value refers directly to (or "points to") another value stored elsewhere in the computer memory using its address. Obtaining or requesting the value to which a pointer refers is called dereferencing the pointer. A pointer is a simple implementation of the general reference data type (although it is quite different from the facility referred to as a reference in C++). Pointers to data improve performance for repetitive operations such as traversing string and tree structures, and pointers to functions are used for binding methods in Object-oriented programming and run-time linking to dynamic link libraries (DLLs).
关于programming-languages - 什么是指针?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/153874/