title: Why initializing data at global scope by passing it to some function is not possible?
body: <p>I've been wondering for a while why initializing any data by passing it to some function is not permitted despite the fact that constructors that are a kind of function anyway can be called at global scope, so if we have something like an array at global scope it can't be initialized by any function but if it was in an object of a structure at global scope then it could be initialized using a constructor at the scope:</p>
  
  <pre><code>//global scope
  
      char charArray[100];//can't be initialized using any function at global scope but in other scopes it could by being passed to some function
  
      struct Test{
       public:
        Test(){
         //initialization
        }
        char charArray[100];
      };
      Test obj();//now charArray can be initialized using constructor at global scope
  </code></pre>