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
Post a Comment