I am trying to check a character pointer is null .How to check if the value is null i am basically from java
char* mypath = getenv("MYPATH");
if(!mypath) //this is not working
throw "path not found";
if(mypath == NULL) //this is also not working
throw "path not found";
i am getting an exception "terminate called after throwing an instance of 'char const*'"