Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
C++中静态变量和全局变量在内存管理方面的区别?
C++中静态方法和全局方法的区别?
我知道这些概念,但还是为了清楚地理解,用简单的话来解释
在内存管理方面没有区别。静态变量和全局变量都具有“静态存储期限”,这意味着它们在程序退出时被销毁。