View Single Post
May8-10, 07:40 PM
P: 21,214
Pointers are used a lot in C and C++, particular in functions that have "call by reference" parameters,. Pointers don't necessarily have to do with memory management, as such, but can be used to provide access to a chunk of data rather than having to deal with the individual items of data. For example, a function can be passed the address of a block of memory, rather than the memory block itself.

Certain data structures, such as linked lists, queues, and such, are often implemented so that the individual components that make up the list or queue have pointers to the next and/or preceding structure in the list.

Quote Quote by Kajahtava
Assembly is fast, assembly doesn't have pointers.
Assembly languages might not have pointers, per se, but the ones I'm familiar with, such as x86 and M68000, certainly have the concept of pointers, in which the contents of memory or a register are considered to be an address an memory, rather than just a plain value.