Null Pointer Assignment

Roger House roger at everexn.com
Sat Oct 13 06:30:55 AEST 1990


In <15004 at mentor.cc.purdue.edu> schikore at mentor.cc.purdue.edu (Dan Schikore) writes:

>What exactly does the run-time error "Null Pointer Assignment" mean?  I get
>this error after a series of recursive calls to a function, but the error does
>not come up until the end of the program.  In fact, I put in the line

Sounds like you are using Microsoft's C compiler.  At runtime MSC places some
special string of characters at "address" 0, i.e., the place in memory that
a pointer with value 0 accesses.  At the end of execution of your program,
some runtime code looks at "address" 0 to see if the special string is still
there.  If not, it means that your code has overwritten this string, which
most likely means that your code accessed data via a pointer which contained
NULL.  Thus, the error message.  Look at your code carefully to see if you
are dereferencing a null pointer.

					Roger House



More information about the Comp.lang.c mailing list