title: Why is this program telling me invalid parameter was passed?
body: <p>Honestly I don't even know what I am trying to do as of now. But I can't go further until I get this function to work, and it throws that exception each time, what is going wrong? The exception is "Unhandled exception at 0x0F61CAB6 (ucrtbased.dll) in CS 330 19S, P1, Calvert, Program 1.exe: An invalid parameter was passed to a function that considers invalid parameters fatal"</p>
  
  <pre><code>#include&lt;iostream&gt;
  #include&lt;vector&gt;
  #include &lt;fstream&gt;
  using namespace std;
  
  struct Kinematic {
      vector&lt;vector&lt;float&gt;&gt; position;
      float orientation;
      vector&lt;vector&lt;float&gt;&gt; velocity;
      float rotation;
  };
  
  struct StreeringOutput {
      vector&lt;vector&lt;float&gt;&gt; linear;
      float angular;
  };
  
  void update(StreeringOutput steering, float time, Kinematic k) 
  {
      for (int i = 0; i &lt; 100; i++) 
      {
          for (int j = 0; j &lt; 100; j++) 
          {
              k.position[i][j] += k.velocity[i][j] * time + 
                             0.5*steering.linear[i][j] * time*time;
                             //the above command is where it throws the exception
              k.velocity[i][j] += steering.linear[i][j] * time;
          }
      }
      k.orientation += k.rotation*time + 0.5*steering.angular*time*time;
      k.rotation = steering.angular*time;
  
  }
  
  
  int main()
  {
      int test;
      Kinematic kin;
      StreeringOutput steering;
      float time = 0.0;
  
      ofstream outfile;
      outfile.open("Output.txt");
  
      for (int i = 0; i &lt; 100; i++)
      {
          update(steering, time, kin);
          time += 0.5;
      }
      cin &gt;&gt; test;
      return 0;
  }
  </code></pre>