title: Passing a class object as an argument in C++
body: <p>Suppose I had a class named foo containing mostly data and class bar that's used to display the data. So if I have object instance of foo named foobar, how would I pass it into bar::display()? Something like void bar::display(foobar &amp;test)?</p>