Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //header
- class Foo {
- public:
- Foo();
- Foo(const Foo& that);
- Foo& operator=(const Foo& that);
- float x;
- };
- //source file
- Foo::Foo() {
- x= 0;
- }
- Foo::Foo(const Foo& that) {
- x= that.x;
- }
- Foo& Foo::operator=(const Foo& that) {
- x= that.x;
- return *this;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement