title: Accessing static array in namespace returning zero
body: <p>As you can see from the code below, I have a namespace with a couple static functions and a static 2D float array. My problem is with the return value of the second function: it's returning 0 when it should be returning 1.16 (the value 'coefficients'). </p>
  
  <p>I've stepped through and 'coefficients' always has the correct values, even in autos the value for coefficients[one*2][two] is correct. There are no errors with reading from the file. The materials I am passing in are both 6 (rubber), so it's not going outside the bounds of the array.</p>
  
  <p>Please help! It has me and a buddy both stumped. (PS: sorry for the weird indentation)</p>
  
  <pre><code>enum Material
  {
      ICE = 0, 
      GLASS = 1, 
      CONCRETE = 2, 
      WOOD = 3,
      METAL = 4,
      SMOOTH_METAL = 5, 
      RUBBER = 6
  };
  
  
   namespace Materials
      {
      static float coefficients[14][7];
  
      static void ReadFrictionCoefficientsFromFile()
      {
          std::ifstream file("FrictionCoefficients.csv");
  
  
  
  if (!file.is_open())
      {
          std::cout &lt;&lt; "ERROR: cannot open file FrictionCoefficients.csv" &lt;&lt; std::endl;
          return;
      }
  
      std::string line;
      float val;
      int row = 0;
      while (std::getline(file, line))
      {
          std::stringstream ss(line);
          int col = 0;
          while (ss &gt;&gt; val)
          {
              coefficients[col][row] = val;
              if (ss.peek() == ',') ss.ignore();
              col++;
          }
          row++;
      }
      file.close();
      }
  
  
      static float GetCombinedStaticFriction(const Material m1, const Material m2)
      {
          int one = (int)m1, two = (int)m2;
          if (one &gt; two)
          {
              one = (int)m2;
              two = (int)m1;
          }
          return coefficients[one * 2][two]; // -- ISSUE -- //
      }
  }
  </code></pre>
  
  <p>Edit: Added lines that call the relevant functions</p>
  
  <pre><code>Materials::ReadFrictionCoefficientsFromFile();
  friction_static = Materials::GetCombinedStaticFriction(body1-&gt;rigidbody.material, body2-&gt;rigidbody.material);
  </code></pre>