In C++ 0 and NULL are interchangeable and the value 0 is compatible with all pointers (so there is actually no need to cast it to char **
)
Question
in PVM , there is a function call PVM_SPAWN
, the head of this function is :
pvm_spawn( char *task, char **argv, int flag, char *where, int ntask, int *tids )
when the function is called, the second argument char** argv
was passing as (char**)0
what (char**)0
means? is it a null pointer or a pointer which point to address 0 ??
Solution
OTHER TIPS
In C++ 0 is the null pointer constant and is guaranteed not to point to any object. You can use it instead of NULL
if you wish.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow