#include <iostream>
class ClassB {
int a, b;
public:
ClassB(int a, int b) {
this->a = a; this->b = b;
std::cout << "ClassB:constructor " << this->a << ',' << this->b << std::endl;
}
~ClassB() { std::cout << "ClassB:destructor " << std::endl; }
void f() { std::cout << "ClassB:f() " << this->a * 2 << ',' << this->b * 2 << std::endl; }
};
void f(ClassB *g) {
g->f();
}
int main() {
f(&ClassB(123, 456));
return 0;
}
/* end */