Pointer
Pointers are special in C++. Pointers can be used to point to a variable instead of becoming a variable. Here is an example: There are 5 integer variables. Each one is named accordingly (anInteger1, anInteger2, ect). However we have a function that uses whatever integer the user chooses.
Enter pointers.
When running the program, the user makes his choice to pick whatever integer he wants. When that happens, the pointer is pointed toward that integer. Finally, whenever the user is ready, he will continue to the next stage, where a function is run to return the value of the integer he has chosen.
The function will automatically pick whatever integer we have the pointer aimed at.
The main advantage to pointer is that they do not waste memory. in the function, we are working with the actual integer variable, rather than a copy of it. This has its disadvantages however. If we will be editing the entered integer value, but do not wish to edit the original variable, pointers will not suffice.
Pointers in Scripting
There are also pointers used in scripting. A few working pointers in the source engine:
- !player - The local player
- !player* - All players in a multiplayer game
- !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.
- !self - Whenever an output runs, this is the entity the output is running from.
External Links
Wikipedia information on pointers
phentermine allegra d acyclovir adipex aldara alesse ambien buspar buy phentermine carisoprodol celexa cheap viagra cholesterol cialis condylox cyclobenzaprine denavir diflucan effexor famvir ioricet flexeril flonase fluoxetine generic viagra imitrex levitra lexapro lipitor nexium ortho evra ortho tricyclen phentermine prevacid prilosec propecia prozac renova retin-a soma tramadol triphasil ultracet ultram altrex vaniqa viagra xenical yasmin zanaflex zithromax zoloft zovirax zyban
zyrtec