Although it seems okay, but its not okay to pass a variable initialized with NULL as out parameter to a function.
For example, I was doing this once upon a time
SomeClass *objSomeClass = NULL;
SomeFunction(objSomeClass);
// where SomeFunction is supposed to return something in objSomeClass
// This code is correct by syntax, but created problems for me.
The right thing to do is
SomeClass * objSomeClass = new SomeClass();
SomeFunction(objSomeClass);
cheers all...
Pgslot Try your luck tonight.
ReplyDelete