Hello there,

I'm trying to pass a reference to a current class as a parameter of a method of another class without success.

Say in class foo I call a function in class bar and pass a reference to foo as a parameter.

Here is the prototype in bar:
Code:
void someFunction(foo & reference);
Here is the call to the function in foo:
Code:
myBar.someFunction(this);
Why is this not allowed? How can foo pass a reference to itself to bar?

Thanks for your help.