title: "Does not name a type" error even though I declare right before assigning the values
body: <p>I have slimmed my problem down to the following code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  struct hello
  {
      int array[4];
      array[0] = 1;
      array[1] = 2;
      array[2] = 3;
      array[3] = 4;
  };
  </code></pre>
  
  <p>And when I compile this I still get the 'array does not name a type' error, on every line where I assign a value.
  AFAIK this error is caused when a variable is nto declared, even though I declare array right above the assignment. </p>