Pointers are special in C++. Pointers can be used to point to a variable instead of becoming a variable.
Here is an example:
Each one is named accordingly (anInteger1, anInteger2, ect)
When running the program, the user makes his choice to pick whatever integer he wants.
When that happens, the pointer is pointed twoard that integer.
The function will automatically pick whatever integer we have the pointer aimed at.
Pointers in Scripting
There are also pointers used in scripting. A few working pointers in the source engine:
- !player - The local player
- !activator - What entity caused the current entity to run it's output. (ie, Player breaks crate, so !activator points to the player.)
- !picker - The entity that the local player is looking at.