Hi, folks~
Let's see the function below first:
No doubt we cuold get the value 0 all the time.PHP Code:
void sta()
{
static int a;
a=0;
a++;
cout << "static a= " << a << endl;
}
and then the next function:
Please Check the difference, a bit interesting~PHP Code:
void sta()
{
static int a=0;
a++;
cout << "static a= " << a << endl;
}