title: C++ - for loop not running
body: <p>Have a very simple code that I'm building in C++. This is my first C++ code so I'm not entirely sure of syntax in some places. However, for the following code, my for loop isn't running at all! I can't see why not... Can anyone spot the problem? </p>
  
  <pre><code>#include &lt;cstdlib&gt;
  #include &lt;cmath&gt;
  
  using namespace std; 
  
  
  int main () {
  /*
   * Use values for wavelength (L) and wave number (k) calculated from linear 
   * dispersion program
   * 
   */
  
  
  //Values to calculate
    double u;                            //Wave velocity: d*phi/dx
    double du;                  //Acceleration of wave: du/dt
  
    int t; 
  //Temporary values for kn and L (taken from linear dispersion solution)
  
    float L = 88.7927;
    float kn = 0.0707624;
  </code></pre>
  
  <p>Note: I've left out variable declarations to save on space.</p>
  
  <pre><code>/*
   * Velocity potential = phi = ((Area * g)/omega) * ((cosh(kn * (h + z)))/sinh(kn * h))*cos(k*x - omega * t);
   * Velocity of wave, u = d(phi)/dx;
   * Acceleration of wave, du = du/dt;
   */
  
      for (t = 0; t == 5; t++) {
        cout &lt;&lt; "in this loop" &lt;&lt; endl;
        u = ((kn * A * g)/omega) * ((cosh(kn * (h + z)))/sinh(kn * h)) *  cos(omega * t);
        du = (A * g * kn) * ((cosh(kn * (h + z)))/sinh(kn * h)) * sin(omega * t); 
        cout &lt;&lt; "u = " &lt;&lt; u &lt;&lt; "\tdu = " &lt;&lt; du &lt;&lt; endl;
      }
  
      cout &lt;&lt; L &lt;&lt; kn &lt;&lt; endl;
  
  return 0;
  
  }
  </code></pre>
  
  <p>I've put the "in this loop" as a test and it doens't enter the loop (compiles fine)..</p>
  
  <p>Thanks in advance for taking a look at this! </p>