title: local variables of static member functions
body: <p>Today we came accross a problem concerning static member functions in an multithreaded environment. The question we asked ourselves and couldn't find a satisfying answer is:
  are local varialbes of static member functions static as well?</p>
  
  <pre><code>// header
  
  class A
  {
    static int test();
  }
  
  // implementation
  int A::test()
  {
    int a = rand();
    int b = rand();
    int c = a + b;
  
    return c;
  }
  </code></pre>
  
  <p>Say you have two threads both calling A::test(). Is it possible that while thread 1 proccesses <code>c = a + b</code> thread 2 enters test() and changes the value of <code>a</code> by assigning the new return value of rand() or in other words do both threads operate an the some memory locations for a, b and c?</p>