Skip to content

Instantly share code, notes, and snippets.

@eed3si9n
Created July 19, 2010 12:02
Show Gist options
  • Save eed3si9n/481313 to your computer and use it in GitHub Desktop.
Save eed3si9n/481313 to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
class Foo {
};
class Bar {
private:
int m_number;
public:
Bar(Foo aFoo) { m_number = 7; }
int getNumber() { return m_number; }
};
int doSomething(Bar aBar) { return aBar.getNumber(); }
int main() {
Foo foo;
cout << doSomething(foo) << endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment