C++ Local Static Variable Allocation -


so im learning c++ memory allocation , static variable. understand local variables allocated stack , not practice static. there situations use of local static variable not work @ all?

i think confusing between two.

there difference between local variable , local static variable. former's life till function exits (allocated on stack) later exists till program exits (allocated in global/static area of program memory).


Comments

Popular posts from this blog

c++11 - Intel compiler and "cannot have an in-class initializer" when using constexpr -

rest - Spring boot: Request method 'PUT' not supported -

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -