Got a error during initializing array's element globally outside main function : <p>When I compiled following code:</p>

<pre><code>#include&lt;bits/stdc++.h&gt;
using namespace std;
long int arr[100003],flag=0;
arr[0]=-1;
int main()
{
}
</code></pre>

<p>I got this error: 'arr' does not name a type arr[0]=-1
Please help me with this.</p>
