S
Serge Skorokhodov (216716244)
Hi,
It may be quite a silly question but I'm a bit in a doubt
Say:
class A
{
void f();
....
};
void A::f()
{
static int i = 1;
....
i = something_complex_calculation_with_unpredictable_result();
}
Some other place:
void ff()
{
....
A* pa = new A;
....
pa->f();
....
delete pa;
....
}
Q: The value of i persists between calls of ff(), doesn't it?
Does the Standard require it?
It may be quite a silly question but I'm a bit in a doubt
Say:
class A
{
void f();
....
};
void A::f()
{
static int i = 1;
....
i = something_complex_calculation_with_unpredictable_result();
}
Some other place:
void ff()
{
....
A* pa = new A;
....
pa->f();
....
delete pa;
....
}
Q: The value of i persists between calls of ff(), doesn't it?
Does the Standard require it?