STATUS

To the person who came up with statics. I hate you with a passion greater than all the love songs ever made!

Posts

Pages: 1
Static local variables: variables declared as static inside a function are statically allocated, thus keep their memory cell throughout all program execution, while having the same scope of visibility as automatic local variables, meaning remain local to the function. Hence whatever values the function puts into its static local variables during one call will still be present when the function is called again.


However, in all of my years of programming, I have never come across a good use for them. Maybe they are used for some optimization strategies?
Pages: 1