#include <iostream>

class foo
{
  public:
    foo() { }
    foo(std::string secret) : secret(secret) { }
    void steal_secret(const foo& other) { secret = other.secret; }
    std::string get_secret() { return secret; }
  private:
    std::string secret;
};

int main() {
    foo f1("don't tell anybody this...");
    foo f2;
    f2.steal_secret(f1);
    std::cout << f2.get_secret() << std::endl;
    return 0;
}