title: Are scoped static variables shared between threads?
body: <p>E.g., can the following code ever print "3" for one of the threads?</p>
  
  <pre><code>int foo()
  {
     static int a = 1;
     return ++a;
  }
  
  void thread1()
  {
     cout&lt;&lt;foo()&lt;&lt;endl;
  }
  
  void thread2()
  {
     cout&lt;&lt;foo()&lt;&lt;endl;
  }
  </code></pre>
  
  <p>edit: It's C++ 98</p>