Tag Archives: local static variables

Static Variables In C And C++ – Function Level

We’ve looked at file level static variables, so now let’s see what happens when you put them in a function. If you declare a static variable at function level (i.e. inside an normal function, not a class method), then you are creating a variable that will: a) be instantiated the first time the function is […]