#include <cstdlib>
#include <iostream>
using namespace std;
int (*test)();
int (*test2)();
int aku(){
static int i = 0;
cout << "NO : " << i << endl;
i++;
}
int main()
{
test = &aku;
test2 = &aku;
(*test)();
(*test)();
return 0;
}
The output is :
NO : 0
NO : 1
My question is,how to make test and test2 independent,although they
refer to same function.
That's mean the output is :
NO : 0
NO : 0