C++中有两种静态变量: (1) 静态局部变量(static local variable),这种变量是在函数调用结束后不消失而保留原 值,即存储单元不释放,在下回调用时,该变量的保留上一次函数调用结束时的值。
基于16个网页-相关网页
local static variable 本地静态变量
This field will hold the value of the static local variable I in GetMessage.
此字段将在GetMessage中保留静态局部变量i的值。
An exception of this type is thrown if a static local variable fails to initialize.
如果静态区域变数无法初始化,会掷回这个型别的例外状况。
You can declare a static local variable within a class, that is, inside a procedure in that class.
您可以初始化静态区域变数的值,当做宣告的一部分。
应用推荐