Hi,
I have the following scenario.
class foo
{
...
private:
char *_test;
};
void foo::setTest()
{
if( 0 != _test ) delete [] _test;
}
The function setTest throws an error when first run as it trying to delete _test when it has not been assigned yet. This is happening because _test is not set to 0X0.
Can anyone help me to understand this?
Thanks in advance.