global variable initialization
<blockquote>
  <blockquote>
    <p>In principle, a variable defined outside any function (that is, global, namespace, and class static variables) is initialized before main() is invoked. Such nonlocal variables in a translation unit are initialized in their declaration order</p>
  </blockquote>
</blockquote>

<p>Above are the lines from the class notes given by my lecturer.</p>

<pre><code>#include &lt;iostream&gt;

using namespace std;
int a=99;
int b;
int main(int argc, char *argv[]) 
{
  cout&lt;&lt;a&lt;&lt;endl;
  cout&lt;&lt;b&lt;&lt;endl;
  return 0;
}
b=100;
</code></pre>

<p>There is an error while I run this.Isn't it true that 'b' assigned to 100 before  main() is called?And the error is <code>C++ requires a type specifier for all declarations</code></p>
