I have this small programm:
#include <iostream>
using namespace std;
int f ();
int g();
int main () {
cout << f() << f() << g();
}
int f () {
static int zahl = 3;
return ++zahl;
}
int g () {
return f();
}
It prints out 654, but I expected 456, and I have no idea why it does that. Can anyone explain?