(char**)0 in C ++

231 Views Asked by At

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 ??

2

There are 2 best solutions below

0
On BEST ANSWER

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 **)

0
On

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.