class MyClass { static int staticInt; void instanceMethod( int param ) { static int parameter = param; } }
It is clear that it staticIntis shared between all instances of MyClass. But can different instances of MyClass have different values of a parameterstatic local variable in instaceMethod?
staticInt
parameter
Update
What is between the programs? Of course, they can be different in several copies of the program? What defines the "area" there - the executive unit? C ++ runtime?
Thanks - it helped me crush a critical error. I wish I could accept all of them, but I'm going with the first answer without any other criteria.
parameter.
parameter , - .
parameter , parameter .
parameter. static . , , - . , . - . , "" , , .
static
parameter staticInt, . , staticInt , parameter instanceMethod.
instanceMethod
, . .
Yes, they both persist. They cannot have different meanings between instances.
values are not saved during program execution (between two different calls of the same program)
Source: https://habr.com/ru/post/1749445/More articles:VS2010 asks to update SIlverlight? - visual-studio-2010How to use AS3 class in MXML? - flexhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1749442/backup-gitosis-repositories-with-rsync&usg=ALkJrhh763-1wvjZ9gwDt8jeRuAMjWMP7gHow do actions and opinions related to the Android platform work? - androidПроверка подлинности Django в django nonrel по GAE - authenticationCan you use your own filter with filters filter_var () and filter_input () - phpConvert json data to HTML table - jsonHow to connect Visual Studio 2010 to IIS 7 to debug a custom HttpModule written for an existing third-party web application - debuggingHow to integrate AdBannerView into Cocos2d - objective-cHow to completely remove rails 3.0.0.beta3 and all its dependencies? - ruby | fooobar.comAll Articles