|
From: Per W. <pw...@ia...> - 2005-03-01 17:35:15
|
A const variable is a variable that may not be changed. A static variable is (if in function) a variable that keeps it's value between multiple calls or (if outside any function) a variable whose name isn't exported to the linker, i.e. not accessible from any other source file. It is perfectly ok to have multiple definitions for a static function as long as they are in separate source files. Since a static function may only be referenced from the same source file, there are no problems with multiple functions having the same signature. /Per W > "static" for a function means the same thing as "const" for a > variable. If you declare a function static, the compiler won't > let you give separate definitions for the function in > different source files. |