看例子
class MyClass {
public:
void fn() {
// Here I want to print caller object name,( here it is ***it1***)
}
};
int main() {
MyClass it1;
it1.fn();
return 0;
}
看例子
class MyClass {
public:
void fn() {
// Here I want to print caller object name,( here it is ***it1***)
}
};
int main() {
MyClass it1;
it1.fn();
return 0;
}