Hello everybody. I've been having a look to the c++ FAQ but couldn't
get any help there.
Does anybody know if is it possible to access a static variable
declared within a function?.
Something like this:
#include <iostream>
void f(int a){
static int sum=0;
sum+=a;}
int main(){
f(8);
f(10);
std::cout<<f::suma; //This doesn't work. another suggestion?
}
Thank you,
J.