#include <utility>
#include <iostream>
#include <functional>

//──────────────────────────────────────────────────────────────────────────────
using CallbackType = std::function<void(void*, int, int)>;
// ──────────────────────────────────────────────────────────────────────────────

class Karbofos {
    CallbackType Call;
  public:
    const std::string Name = "Карбофос";
    void SetCallback(CallbackType C) {
      Call = std::move(C);
    }
    void Run() {
      if (Call)
        Call(this, 1, 20);
      std::cout << "- Не продам!\n";
    }
};
//──────────────────────────────────────────────────────────────────────────────
class Shef {
  public:
    void Entreaty(void* c, int a, int b) {
      std::cout << "- " << ((Karbofos*)c)->Name
                << ", продай слона за "
                << a << "." << b << "р ?\n";
    }
};
//──────────────────────────────────────────────────────────────────────────────
int main() {
  Karbofos K;
  Shef S;
  K.SetCallback(std::bind(
                  &Shef::Entreaty, &S,
                  std::placeholders::_1,
                  std::placeholders::_2,
                  std::placeholders::_3)
               );
  K.Run();
  return 0;
}
