passing 0 to const char[]

Jonathan M Davis jmdavisProg at gmx.com
Tue Aug 14 14:33:21 PDT 2012


On Tuesday, August 14, 2012 23:28:08 Andrew Spott wrote:
> This appears to be the correct answer. I was mostly just
> confused. something #defined is just replaced by the C
> preprocessor (or so I thought), which means that in C, you would
> be passing 0 to PetscInitialize... which seems weird.

0 _is_ the null value in C. What's weird is that they had a non-standard macro 
for it (NULL is frequently used, but PETSC_NULL is not standard at all).

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list