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的值。
Given the runtime overhead in using a static local variable, it would be wise for you to avoid the feature in current designs.
由于运行库在使用静态局部变量时有开销,因此您最好避免在当前设计中使用该功能。
The static local variable is interesting because the common language runtime (CLR) does not support static variables inside a method.
静态局部变量之所以非常令人感兴趣,是因为公共语言运行库(CLR)不支持方法内的静态变量。
应用推荐