Mail Archives: djgpp/1995/05/09/20:22:42
> I've never really followed what goes on with C++ call by reference, I
> tend to stick to using the C way of thinking.
It's certain that when I pass the array by reference, the compiler is
implementing it by passing a pointer, but how it is implemented should
not matter to me at the programming level.
Besides, no matter how the compiler is mangling the interpretation of
passing by reference, it should ALWAYS be possible to pass a parameter
of a function back to the same function recursively - no matter HOW that
parameter is defined.
The test case was:
class foo
{
public:
void foo(something & x)
{
foo(x);
}
}
foo::foo is passing its own parameter to itself. Even if foo was
declared as "void(*)()(*foo)(void(*)())" it should still be able to pass
it to itself recursively.
Kim
- Raw text -