这是代码
int& fun(){ static int x = 10; return x; } int main() { fun() = 30; cout<< fun(); getch(); }
输出是30.这是如何工作的?
c++
c++ ×1