what do you want to know about it? c++ objects are normally passed by reference to avoid expensive duplication and to let other functions use the same object as the calling function.
class MyClass
{
// blabla
};
void foo(MyClass& obj)
{
// class passed by reference
}
int main()
{
MyClass myclass; // create an instance of the class
foo(myclass); // pass it to another function
}
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343