一道笔试题 关于static

来源:互联网 发布:极客范树莓派网络配置 编辑:程序博客网 时间:2024/05/16 17:54
int foo(){   static int x=3;   x+=2;   return x;} int main(){   cout<<foo()<<foo()<<endl;}

本人小白,不懂为何输出是75,求大神解答 ~
0 0
原创粉丝点击