Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Foo
- {
- public:
- Foo() : n(0) { std::cout << "Create\n"; };
- ~Foo() { std::cout << "Delete\n"; };
- private:
- int n = 0;
- };
- Foo getFoo()
- {
- Foo foo;
- return foo;
- }
- void main()
- {
- Foo foo;
- foo = getFoo();
- }
Advertisement
Add Comment
Please, Sign In to add comment