title: "Process terminated with status -1073741819" simple program with vector
body: <p>for some reason I get the "Process terminated with status -1073741819" error whenever I run my program, I've read that some people get this error because of something wrong with code-blocks/the compiler, i just wanted to know if there is anything wrong with my code before i go reinstalling compilers and such. I'm using code::blocks and the GNU GCC compiler.</p>
  
  <p>my code creates a vector which stores 40 working hours in a week, and a vector inside that vector which stores letters representing the 5 people available in those hours.</p>
  
  <p><strong>Schedule.cpp:</strong></p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "Schedule.h"
  #include &lt;vector&gt;
  #include &lt;string&gt;
  
  using namespace std;
  
  /// Creates a Vector which holds 40 items (each hour in the week)
  /// each item has 5 values ( J A P M K or X, will intialize as J A P M K)
  
  vector&lt; vector&lt;string&gt; &gt; week(40, vector&lt;string&gt; (5));
  
  Schedule::Schedule(){
          for (int i = 0; i&lt;40; i++){
              week[i][0] = 'J';
              week[i][1] = 'A';
              week[i][2] = 'P';
              week[i][3] = 'M';
              week[i][4] = 'K';
          }
          // test 
          cout &lt;&lt; week[1][3] &lt;&lt; endl;
      }
  </code></pre>
  
  <p><strong>header file:</strong></p>
  
  <pre><code>#ifndef SCHEDULE_H
  #define SCHEDULE_H
  #include &lt;vector&gt;
  #include &lt;string&gt;
  
  using namespace std;
  
  class Schedule
  {
      public:
          Schedule();
      protected:
      private:
          vector&lt; vector&lt;string&gt; &gt; week;
  
  };
  
  #endif // SCHEDULE_H
  </code></pre>
  
  <p><strong>main.cpp:</strong></p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "Schedule.h"
  #include &lt;vector&gt;
  #include &lt;string&gt;
  
  using namespace std;
  
  int main()
  {
      Schedule theWeek;
  }
  </code></pre>