C/C++: Can I access static variables inside a function from outside? For example:
#include using namespace std; void f() { static int c
A static variable has a scope within the block but it has a lifetime of throughout the program so you cant access the coun tvariable try returning a pointer from the function.