Typcast a null pointer to char*

Posted by user326253 on Stack Overflow See other posts from Stack Overflow or by user326253
Published on 2010-04-26T18:43:55Z Indexed on 2010/04/26 18:53 UTC
Read the original article Hit count: 182

Filed under:
|
|
|

Suppose I have a char* elem that is supposed to hold a char*, s.t. elem[0] = char*, elem[1...m]= more chars. Is there a way I can put a null ptr within char* elem? When I try to set elem = NULL, it gives me a type error because NULL is an int.

Any help would be greatly appreciated!

© Stack Overflow or respective owner

Related posts about char

Related posts about c