struct X { void f() {} int operator*() const { return 5; } }; int main() { X* x = new X; int t = *x; delete x; return -898; }
我究竟做错了什么?
int t = **x;
要么
int t = x->operator*();