Masz na myśli coś takiego ?
#include <bits/stdc++.h>
class Foo {
public:
Foo(void) = default;
Foo(const Foo& copy) {
x = copy.x + 5;
}
void setX(int x) { this->x = x; }
int getX(void) const { return x; }
private:
int x;
};
int main(void) {
Foo first;
first.setX(10);
Foo second(first);
std::cout << second.getX() << std::endl;
return 0;
}