title: Questions about the static keyword with functions and data
body: <p>I have a few questions about the static keyword in C++ (and probably with other languages as well.) What is the purpose of declaring a function as static?</p>
  
  <pre><code>void static foo(int aNumber) {
  ... }</code></pre>
  
  <p>How about a static inline function?</p>
  
  <pre><code>void static inline foo(int aNumber) {
  ... }</code></pre>
  
  <p>Is there any benefit to using the static keyword with a function, and do those benefits apply to class functions as well?
  I realize some datatypes like structs and arrays have to be static when compiling with an older compiler, but is there any point when using a new ANSI-C++ compiler (like MS VC++ 2008)? I know that using a static variable inside a loop saves time by keeping the data in memory and not reallocating memory every loop iteration, but how about when a variable is declared only once, like at the top of a header file or within a namespace?</p>