my bad i guess i should of continued with the program
Code:
int my_func(void)
{
static int a = 3;
a += 2;
return a;
}
int main ()
{
int a = 5, b;
b = my_func();
while (a>b)
{
printf(" a is %d", a);
}
printf(" b is no bigger than a");
}
the whole point of the example was trying to reiterate what laserlight said about declaring a variable as static was effectively declaring it as global (only one source file for this program) so re-declaring a is effectively a conflict like trying to declare two int x's
coop