That's not what a static variable does in C.
A static variable in C does two different things depending on what scope it's defined in: if it's in file scope, it is local to a source file (compilation unit); if inside a function, it's a variable that has only one instance and not separate instances in every function. C also has static functions and static class members in C++ but those also mean something like one of these and not default values like you're saying.
In reply to Re: idea for an static variable
by ambrus
in thread idea for an static variable
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |