title: C++ Program crashes with array of structs declaration
body: <p>I can't figure out what's the problem with the following code, it just crashes without outputing anything to the screen:</p>
  
  <pre><code>#include &lt;cstdlib&gt;
  #include &lt;iostream&gt;
  using namespace std;
  
  typedef struct {
      unsigned int recid;
      unsigned int num;
      char str[120];
      bool valid;
  } record_t;
  
  typedef struct {
      unsigned int blockid;
      unsigned int nreserved; 
      record_t entries[100];
      bool valid;
      unsigned char misc;
  } block_t;
  
  int main(){
      cout &lt;&lt; "Before Buffer" &lt;&lt; endl;
      block_t buffer[1000];
      cout &lt;&lt; "After Buffer" &lt;&lt; endl;
      return 0;
  }
  </code></pre>
  
  <p>I tried Qt debugger and GBD and they just show segmentation fault and point at the start of the main function.</p>
  
  <p>The size of each block_t element is 13,2 Kbs so the size of the buffer array should be around 13Mb. Maybe that's too much for a C-array?</p>