Jump to content

Pointer error

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Ed Poor (talk | contribs) at 15:28, 17 November 2006 (dereference operator). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

A pointer error in a computer program is any mistake involving pointer variables. Common errors include confusing the value of the pointer

forgetting whether a varable contains the desired value, or a memory reference to the desired value.

You might want to do arithmetic on a variable, but accidentally do that operation on the pointer to the variable instead.

Another error, which can lead to memory corruption and excruciatingly difficult debugging sessions, arises when a pointer goes beyond its proper bounds. If the program writes to (or even reads from) an the wrong area of memory, unpredictable results can occur.

See: