Hi,
I am getting core dump for the following code in HP-UNIX platform.
void *Et::oppAddr()
{
return(NULL);
}
Can we return a NULL value for a void function ?? I have a program, where almost all functions are written like this. But, for this function, I am getting core dump. Please suggest !! Thanks in advance..
I think it is throwing due to its usage. are u using the return value else where ?
First of all it's not a void function, this fuction returns pointer (void *).
There is nothing wrong if function returns null pointer, usually meaning it failed to do job as expected.
Check if you don't derefernce this pointer without null pointer check.