There are three different meanings for the static keyword. It's a real pain.
cplusplus.syntaxerrors.info
cplusplus.syntaxerrors.info
In a function: the value of the variable stays with the function, i.e. it doesn't change between calls.
In a class: the value of the variable stays with the class, i.e. it doesn't change with the creation of new objects.
In a file: the value of the variable stays within the file, i.e. it can't be changed (or seen) from outside the file.
The other two are essentially the same just within class or function scope. Of course, they're essentially just global state of a sort, but they sure do come in useful at times.
Now some templates, on the other hand, seem to be from another dimension.