G
Guest
What is the difference between passing argument by reference or by pointer?
Is there any difference in terms of PERFORMANCE ?
When and why one of these method (by reference or by pointer) should be
preferred?
THX.
typedef struct{
int X,Y,Z}TMyStructure;
void Function1(TMyStructure &xyz)
{
xyz.X = 123;
.. . .
}
void Function2(TMyStructure *xyz)
{
xyz->X = 123;
.. . .
}
Is there any difference in terms of PERFORMANCE ?
When and why one of these method (by reference or by pointer) should be
preferred?
THX.
typedef struct{
int X,Y,Z}TMyStructure;
void Function1(TMyStructure &xyz)
{
xyz.X = 123;
.. . .
}
void Function2(TMyStructure *xyz)
{
xyz->X = 123;
.. . .
}