programming-languages - 什么是指针?

标签 programming-languages pointers language-features

这个问题在这里已经有了答案:




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/

相关文章:

c - 编译成c的高级系统语言?

language-agnostic - 从 "Atoms"构建 OOP 编程语言

c++ - 常量变量悖论

c - 访问结构体内部的数组时程序崩溃

language-agnostic - 是否应该从编程语言中删除(非接口(interface)类型的)继承?

programming-languages - 有没有没有全局变量的编程语言?

pointers - 理解 Go 中的指针

c++ - 在 C++ 中使用 C 特性是不好的做法吗?

Objective-C:如何防止抽象泄漏

C 标度整数