Quote:
|
Originally Posted by gnormhurst
I think you'll need to declare that int as 'static' -- otherwise it won't be remembered from one cycle to the next:
Code:
static int count = 0;
|
The static isn't necesary if it is gloabal. Static on a gloabal variable in C is completely different, as it limits the "global" variable's scope to only the file it is declared in. However, if you aren't using it from a different file, you won't be able to tell the difference.