A
A
Hi,
I'd like to do something very simple but I'm not sure if I'm doing it right:
I have 2 functions:
//------------
void Function1(TObject *obj)
{
Function2(obj);
}
void Function2(TObject *obj)
{
obj->CallSomeObjFunction();
}
//------------
So basically Function1 simply calls Function2 and passes pointer to use it
in Function2.
The above code compiles and works, but I'm not sure about the scopes of obj
pointer and if it can be used like this?
Is the above usage of pointer correct or should I use &obj instead?
I'd like to do something very simple but I'm not sure if I'm doing it right:
I have 2 functions:
//------------
void Function1(TObject *obj)
{
Function2(obj);
}
void Function2(TObject *obj)
{
obj->CallSomeObjFunction();
}
//------------
So basically Function1 simply calls Function2 and passes pointer to use it
in Function2.
The above code compiles and works, but I'm not sure about the scopes of obj
pointer and if it can be used like this?
Is the above usage of pointer correct or should I use &obj instead?